Stack Exchange often uses the <a> HTML element where it should use the <button> element. For example, on the profile page I can sort my answers by "votes", "activity" or "newest":

The HTML markup for these tabs is as follows:

<div class="subtabs user-panel-subtabs">
  <a href="javascript:void(0)" class="youarehere" data-sort-id="votes">votes</a>
  <a href="javascript:void(0)" data-sort-id="activity">activity</a>
  <a href="javascript:void(0)" data-sort-id="newest">newest</a>

These should be <button>s, not <a>s. See The Difference Between Anchors, Inputs and Buttons and Which “href” value to use for JavaScript links: “#” or “javascript:void(0)”?

You must log in to answer this question.

Browse other questions tagged .