Dev Helpers
← Back

Emphasize the current navigation item

Emphasize the current navigation item with native CSS. The preview includes a small shared demo stylesheet.

Open this example in the interactive library

Source code

<style>
  .demo [aria-current="page"] {
    text-decoration: underline;
    font-weight: 700;
  }
</style>
<nav class="demo" aria-label="Product">
  <span>Home</span> · <span aria-current="page">Library</span>
</nav>