Last Updated: February 25, 2016
·
5.285K
· teddyzetterlund

Use placeholder links

A lot of us are unaware about what the HTML5 specification says about our bellowed anchor-element.

If the a element has no href attribute, then the element represents a placeholder for where a link might otherwise have been placed, if it had been relevant.

Forget about those span element replacements used to style links targeting the current page. Remove the href attribute from the link instead.

<nav>
  <ul>
    <li><a href="/">Home</a></li>
    <li><a href="/news">News</a></li>
    <li><a>Examples</a></li>
    <li><a href="/legal">Legal</a></li>
  </ul>
</nav>

Source: WHATWG: HTML: The Living Standard