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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

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

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

  
    <nav class="navbar" id="navbar">
    <ul class="navbar-nav">
      <li class="logo">
        
          <header class="link-text logo-text" >Html</header>
           <svg
            aria-hidden="true"
            focusable="false"
            data-prefix="fad"
            data-icon="angle-double-right"
            role="img"
            xmlns="http://www.w3.org/2000/svg"
            viewBox="0 0 448 512"
            class="svg-inline--fa fa-angle-double-right fa-w-14 fa-5x"
          >
            <g class="fa-group">
              <path
                fill="currentColor"
                d="M224 273L88.37 409a23.78 23.78 0 0 1-33.8 0L32 386.36a23.94 23.94 0 0 1 0-33.89l96.13-96.37L32 159.73a23.94 23.94 0 0 1 0-33.89l22.44-22.79a23.78 23.78 0 0 1 33.8 0L223.88 239a23.94 23.94 0 0 1 .1 34z"
                class="fa-secondary"
              ></path>
              <path
                fill="currentColor"
                d="M415.89 273L280.34 409a23.77 23.77 0 0 1-33.79 0L224 386.26a23.94 23.94 0 0 1 0-33.89L320.11 256l-96-96.47a23.94 23.94 0 0 1 0-33.89l22.52-22.59a23.77 23.77 0 0 1 33.79 0L416 239a24 24 0 0 1-.11 34z"
                class="fa-primary"
              ></path>
            </g>
          </svg>
          
        
        </a>
      </li>
<section id="Elements" class="nav-item">
      
        <a href="#Elements" class="nav-link" >
          
          <span class="link-text">Elements</span>
          
        </a>
      </li>
</section>
      <li class="nav-item">
        <a href="#attributes" class="nav-link">
          
          <span class="link-text">Attributes</span>
        </a>
      </li>

      <li class="nav-item">
        <a href="#headings" class="nav-link">
          
          <span class="link-text">Headings</span>
        </a>
      </li>

      <li class="nav-item">
        <a href="#paragraphs" class="nav-link">
          
          <span class="link-text">Paragraphs</span>
        </a>
      </li>
      <li class="nav-item">
        <a href="#styles" class="nav-link">
         
          <span class="link-text">Styles</span>
        </a>
      </li>

      
    </ul>
  </nav>

    

<main id="main-doc">
   <section class="main-section" id="Elements">
     <header><b>Elements</b></header>
     <p>An HTML element usually consists of a start tag and an end tag, with the content inserted in between:</p>
     <code>&lt;tagname&gt;Content goes here...&lt;/tagname&gt;</code>
  <p>The HTML element is everything from the start tag to the end tag:</p>
     <p>Here are some common elements
     <li>&lt;h1&gt;My first heading&lt;/h1&gt;</li>
       <li>&lt;p&gt;My first paragraph &lt;/p&gt;</li>
       <li>&lt;br&gt;</li>
       <p>HTML elements with no content are called empty elements. Empty elements do not have an end tag, such as the &lt;br&gt; element (which indicates a line break).</p>
  </section>
  
  
   <section class="main-section" id="attributes">
    <header>Attributes</header>
     <p>Attributes provide additional information about HTML elements</p>
     <li>All HTML elements can have attributes</li>
     <li>Attributes provide additional information about an element</li>
     <li>Attributes are always specified in the start tag</li>
     <li>Attributes usually come in name/value pairs like: name="value"
</li>
  <p></p>
     <code></code>
  </section>
  
  
  
   <section class="main-section" id="headings">
    <header>Headings</header>
     <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras eget pulvinar erat. Fusce vitae gravida diam. Praesent dapibus ligula aliquet elementum laoreet. Morbi ut nisl ullamcorper erat egestas cursus. Aenean rutrum, magna eu congue facilisis, leo orci consectetur tortor, eu condimentum ex diam dictum nisi. Praesent quis odio et diam interdum auctor. Quisque pulvinar sit amet sem ac dictum. Vestibulum sit amet luctus odio.</p>
  <p></p>
     <code></code>
  </section>
  
  
  
   <section class="main-section" id="paragraphs">
    <header>Paragraphs</header>
     <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras eget pulvinar erat. Fusce vitae gravida diam. Praesent dapibus ligula aliquet elementum laoreet. Morbi ut nisl ullamcorper erat egestas cursus. Aenean rutrum, magna eu congue facilisis, leo orci consectetur tortor, eu condimentum ex diam dictum nisi. Praesent quis odio et diam interdum auctor. Quisque pulvinar sit amet sem ac dictum. Vestibulum sit amet luctus odio.
     In hac habitasse platea dictumst. Suspendisse eros leo, porttitor sed fermentum nec, sagittis eget velit. Suspendisse sed nunc dolor. Vestibulum ut sagittis libero, sed luctus orci. Quisque pretium mattis ex et blandit. Donec mollis arcu leo, quis convallis sapien ultrices eget. Donec condimentum ornare leo eu luctus. Suspendisse varius feugiat porta.

Nullam massa elit, gravida vel sapien ut, dictum condimentum ipsum. Aliquam dapibus ultricies bibendum. Suspendisse vulputate justo quis ex facilisis, vel cursus est imperdiet. Praesent eu accumsan diam. Nulla et efficitur sem. Mauris ac placerat sem. Sed semper mi nec nibh fermentum tempor. Integer quis sapien ut sapien tristique vehicula ut sed nisl. Mauris metus neque, feugiat et diam vitae, dignissim fringilla est.</p>
  <p></p>
     <code></code>
     </section>
  
  
     <section class="main-section" id="styles">
    <header>Styles</header>
       <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras eget pulvinar erat. Fusce vitae gravida diam. Praesent dapibus ligula aliquet elementum laoreet. Morbi ut nisl ullamcorper erat egestas cursus. Aenean rutrum, magna eu congue facilisis, leo orci consectetur tortor, eu condimentum ex diam dictum nisi. Praesent quis odio et diam interdum auctor. Quisque pulvinar sit amet sem ac dictum. Vestibulum sit amet luctus odio.
       In hac habitasse platea dictumst. Suspendisse eros leo, porttitor sed fermentum nec, sagittis eget velit. Suspendisse sed nunc dolor. Vestibulum ut sagittis libero, sed luctus orci. Quisque pretium mattis ex et blandit. Donec mollis arcu leo, quis convallis sapien ultrices eget. Donec condimentum ornare leo eu luctus. Suspendisse varius feugiat porta.

Nullam massa elit, gravida vel sapien ut, dictum condimentum ipsum. Aliquam dapibus ultricies bibendum. Suspendisse vulputate justo quis ex facilisis, vel cursus est imperdiet. Praesent eu accumsan diam. Nulla et efficitur sem. Mauris ac placerat sem. Sed semper mi nec nibh fermentum tempor. Integer quis sapien ut sapien tristique vehicula ut sed nisl. Mauris metus neque, feugiat et diam vitae, dignissim fringilla est.</p>
  <p></p>                                                 
       <code></code>
  </section>
  
  
  
</main>
              
            
!

CSS

              
                body{
  font-size:24px;
  color:black;
  backgroud-color: grey;
  margin:0;
  padding:0;
 
}
main{
  margin-left:3rem;
  padding:3rem;
  
}
.navbar{
  width:5rem;
  height:100vh;
  position:fixed;
}

.navbar {
  position: fixed;
  background-color: grey;
  transition: width 600ms ease;
  overflow: scroll;
}

.navbar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.nav-item {
  width: 100%;
}

.nav-item:last-child {
  margin-top: auto;
}

.nav-link {
  display: flex;
  align-items: center;
  height: 5rem;
  color: var(--text-primary);
  text-decoration: none;
  filter: grayscale(100%) opacity(0.7);
  transition: var(--transition-speed);
}

.nav-link:hover {
  filter: grayscale(0%) opacity(1);
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

#link-text {
  display: none;
  margin-left: 1rem;
}

.nav-link svg {
  width: 2rem;
  min-width: 2rem;
  margin: 0 1.5rem;
}

.fa-primary {
  color: #ff7eee;
}

.fa-secondary {
  color: #df49a6;
}

.fa-primary,
.fa-secondary {
  transition: var(--transition-speed);
}

.logo {
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  font-size: 1.5rem;
  letter-spacing: 0.3ch;
  width: 100%;
}

.logo svg {
  transform: rotate(0deg);
  transition: var(--transition-speed);
  transition-duration:1s;
}

.logo-text
{
  display: inline;
  position: absolute;
  left: -999px;
  transition: var(--transition-speed);
}

.navbar:hover .logo svg{
  transform: rotate(-180deg);
}

/* Small screens */
@media only screen and (max-width: 600px) {
  .navbar {
    bottom: 0;
    width: 100vw;
    height: 10rem;
    
  }

  .logo {
    display: none;
  }

  .navbar-nav {
    flex-direction: row;
  }

  .nav-link {
    justify-content: center;
  }

  main {
    margin: 0;
  }
}

/* Large screens */
@media only screen and (min-width: 600px) {
  .navbar {
    top: 0;
    width: 5rem;
    height: 100vh;
  }

  .navbar:hover {
    width: 16rem;
  }

  .navbar:hover .link-text {
    display: inline;
  }

  .navbar:hover .logo svg
  {
    margin-left: 11rem;
  }

  .navbar:hover .logo-text
  {
    left: 45px;
    top:15px;
    font-size:35px;
  }



  body::-webkit-scrollbar {
  width: 0.75rem;
}

body::-webkit-scrollbar-track {
  background: #1e1e24;
}

body::-webkit-scrollbar-thumb {
  background: #6649b8;
}
              
            
!

JS

              
                
              
            
!
999px

Console