Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <html>
  <body>
  
  <nav id="navbar">
    <header>menu</header>

    <ul>
      <li> <a href="#introduction" class="nav-link" id="introduction">introduction</a></li>

      <li> <a href="#how_its_used" class="nav-link" id="how_its_used">how its used</a></li>

      <li> <a href="#how_it_works" class="nav-link" id="how_it_works">how it works</a></li>

      <li> <a href="#examples" class="nav-link" id="examples">examples</a></li>

      <li> <a href="#final_comments" class="nav-link" id="final_comments">final comments</a></li>

    </ul>
    </div>
  </nav>

<main id="main-doc">
  <section class="main-section" id="introduction">
    <header>introduction</header>
    <li>introduction</li>
    <p>paragraph about introduction</p>
    <p>paragraph about introduction</p>
    <code>this is my code tag</code>
 <a>introduction</a>
  </section>

  <section class="main-section" id="how_its_used">
    <header>how its used</header>
    <li>how its used</li>
    <p>paragraph about how its used</p>
    <p>paragraph about how its used</p>
    <code>this is my code tag</code>

    <a>how its used</a>
  </section>

  <section class="main-section" id="how_it_works">
    <header>how it works</header>
    <li>how it works</li>
    <p>paragraph about how it works</p>
    <p>paragraph about how it works</p>
    <code>this is my code tag</code>
    <a>how it works</a>
  </section>

  <section class="main-section" id="examples">
    <header>examples</header>
    <li>examples</li>
    <p>paragraph about example</p>
    <p>paragraph about examples</p>
    <code>this is my code tag</code>

    <a>examples</a>
  </section>

  <section class="main-section" id="final_comments">
    <header>final comments</header>
    <li>final comments</li>
    <p>paragraph about final comments</p>
    <p>paragraph about final comments</p>
    <code>this is my code tag</code>

    <a>final comments</a>

  </section>

  </div>

  <!--nav-->

  

</main>
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
</body>

</html>


              
            
!

CSS

              
                *{
  margin:0;
  padding:0;
}
body{
  display:flex;
  justify-content:flex-start;
}

#navbar{
  top:0;
  position:sticky;
  height:100vh;
  max-width:400px;
  width:100%;
}

#navbar header{
  font-size:30px;
  text-align:center;
}

main {
  background:lightblue;
  font: 18px sans-serif;
  line-height: 1.6em;
  padding-left:10px;
  width:75%;
}


ul {
  list-style-type: none;
  background-color: #f1f1f1;
}

li {
  list-style-type: none;
  text-align: center;
  
  
}

li a {
  display: block;
  padding: 8px 16px;
  text-decoration: none;
  border-bottom: 1px solid #555;
  border: 1px solid #555;  
}

li a:hover {
  background-color: #555;
  color: white;
}

li:last-child {
  border-bottom: none;
}

@media only screen and (max-width: 600px) {
  main {
    background-color: lightblue;
  }
}


              
            
!

JS

              
                
              
            
!
999px

Console