<a href="#content" class="skip-link">Skip to content</a>

<nav class="c-nav">
  <a href="/" class="c-nav__link">Nav 1</a>
  <a href="/" class="c-nav__link">Nav 2</a>
  <a href="/" class="c-nav__link">Nav 3</a>
  <a href="/" class="c-nav__link">Nav 4</a>
</nav>
  
 <main id="content" class="c-main">
   <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
   <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
 </main>
.skip-link {
    position: absolute;
    top: 50px;
    left: 0;
    display: block;
    margin: 0;
    padding: 0.5rem;
    background-color: yellow;
    color: #000;
    text-decoration: none;
    height: 1px;
    width: 1px;
    position: absolute;
    overflow: hidden;
    clip: rect(1px 1px 1px 1px);
    z-index: 10;
}

.skip-link:focus {
    width: auto;
    height: auto;
    clip: auto;
}

.c-nav {
  display: flex;
  background-color: #000;
}

.c-nav__link {
  color: #fff;
  padding: 1rem;
  text-decoration: none;
}

.c-main {
  padding: 1rem;
}

.c-main p {
  margin: 0 0 1rem 0;
}
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.