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 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

              
                <nav id="navbar">
    <header class="html-header">
       Html Documentation
    </header>
    <ul class="list1"><li class="nestli">
        <a class="nav-link" href="#Introduction" >Introduction</a></li>
      <li class="nestli"><a class="nav-link" href="#Editors">Editors</a></li>
      <li class="nestli"> <a class="nav-link" href="#Basic">Basic</a></li>
      <li class="nestli"><a class="nav-link" href="#Elements">Elements</a></li>
      <li class="nestli"><a class="nav-link" href="#Attributes">Attributes</a></li>
      <li class="nestli"><a class="nav-link" href="#Reference">Reference</a></li>
    </ul>
  </nav>
  <main id="main-doc">
    <section class="main-section" id="Introduction">
      <header>Introduction</header>
      <p>HTML is the standard markup language for creating Web pages.</p>
      <h2>What is HTML?</h2>
      <ul>
        <li>HTML stands for Hyper Text Markup Language</li>
        <li>HTML is the standard markup language for creating Web pages</li>
        <li>HTML describes the structure of a Web page</li>
        <li>HTML consists of a series of elements</li>
        <li>HTML elements tell the browser how to display the content</li>
        <li>HTML elements label pieces of content such as "this is a heading", "this is a paragraph", "this is a link", etc.</li>
      </ul>
      <h2>A Simple HTML Code</h2>
      <p>Example:<p> <code
        >&#60;!DOCTYPE html&#62; &#60;html&#62; &#60;head&#62; &#60;title&#62;Page Title&#60;/title&#62; &#60;/head&#62; &#60;body&#62; &#60;h1&#62;My First Heading&#60;/h1&#62; &#60;p&#62;My first paragraph.&#60;/p&#62; &#60;/body&#62; &#60;/html&#62;
      </code>
      <h3>Example Explained</h3>
      <ul>
        <li>The &#60;!DOCTYPE html&#62; declaration defines that this document is an HTML5 document</li>
        <li>The &#60;html&#62; element is the root element of an HTML page</li>
        <li>The  &#60;head&#62;  element contains meta information about the HTML page</li>
        <li>The &#60;title&#62; element specifies a title for the HTML page (which is shown in the browser's title bar or in the page's tab)</li>
        <li>The &#60;body&#62; element defines the document's body, and is a container for all the visible contents, such as headings, paragraphs, images, hyperlinks, tables, lists, etc.</li>
        <li>The &#60;h1&#62; element defines a large heading</li>
        <li>The &#60;h1&#62; element defines a paragraph
</li>
      </ul>
      <h2>What is an HTML Element?</h2>
      <p>An HTML element is defined by a start tag, some content, and an end tag:</p>
      <p>&#60;tagname&#62;Content goes here...&#60;/tagname&#62;</p>
      <p>The HTML element is everything from the start tag to the end tag:</p>
      <pre><code>&#60;h1&#62;My First Heading&#60;/h1&#62;
      
 &#60;p&#62;My first paragraph.&#60;/p&#62;</code></pre>
    </section>
     <section class="main-section" id="Editors">
       <header>Editors</header>
       <p>A simple text editor is all you need to learn HTML.</p>
       <h2>Learn HTML Using Notepad or TextEdit</h2>
       <p>Web pages can be created and modified by using professional HTML editors.

However, for learning HTML we recommend a simple text editor like Notepad (PC) or TextEdit (Mac).

We believe in that using a simple text editor is a good way to learn HTML.

Follow the steps below to create your first web page with Notepad or TextEdit</p>
       <h2>Step 1: Open Notepad (PC)</h2>
       <ul>
         <li>Windows 8 or later:</li>
         <li>Open the Start Screen (the window symbol at the bottom left on your screen). Type Notepad.</li>
         <li>Windows 7 or earlier:</li>
         <li>Open Start > Programs > Accessories > Notepad

</li>
       </ul>
       <h2>Step 1: Open TextEdit (Mac)</h2>
       <ul>
         <li>Open Finder > Applications > TextEdit</li>
         <li>Also change some preferences to get the application to save files correctly. In <strong>Preferences > Format</strong> > choose <strong>"Plain Text"</strong></li>
         <li>Then under "Open and Save", check the box that says "Display HTML files as HTML code instead of formatted text".</li>
         <li><strong>Then open a new document to place the code.</strong>

</li>
 </ul> 
       <h2>Step 2: Write Some HTML</h2>
       <p>Write or copy the following HTML code into Notepad:</p>
       <pre><code>&#60;!DOCTYPE html&#62;
       &#60;html&#62; 
       &#60;body&#62;
       &#60;h1&#62;My First Heading&#60;/h1&#62;
       &#60;p&#62;My first paragraph.&#60;/p&#62;
       &#60;/body&#62; 
       &#60;/html&#62;</code></pre><br>
       <img src="https://www.w3schools.com/html/img_notepad.png" alt="html notepad image">
       
       <h2>Step 3: Save The Html Page
</h2>
  <p>Save the file on your computer. Select File > Save as in the Notepad menu.</p>
  <p>Name the file "index.htm" and set the encoding to UTF-8 (which is the preferred encoding for HTML files).</p>
       <img src="https://www.w3schools.com/html/img_saveas.png" alt="">
       <h2>Step 4: View the HTML Page in Your Browser</h2>
       <p>Open the saved HTML file in your favorite browser (double click on the file, or right-click - and choose "Open with").</p>
 <p>The result will look much like this:</p> <img src="https://www.w3schools.com/html/img_chrome.png" alt="">
 </section>
    <section class="main-section" id="Basic">
      <header>Basic</header>
      <p>In this section we will show some basic HTML examples.</p>
      <h2>HTML Documents</h2>
      <pre>All HTML documents must start with a document type declaration: <code>&#60;!DOCTYPE html&#62;.</code></pre>
      <pre>The HTML document itself begins with <code>&#60;html&#62; and ends with &#60;/html&#62;.</code></pre>
      <pre>The visible part of the HTML document is between<code> &#60;body&#62;</code> and <code>&#60;/body&#62;</code>.</pre>
      <h2>The <code>&#60;!DOCTYPE&#62;</code> Declaration<code>&#60;!DOCTYPE&#62;</code></h2>
      <p>The declaration represents the document type, and helps browsers to display web pages correctly.</p>
      <p>It must only appear once, at the top of the page (before any HTML tags).</p>
      <pre>The <code>&#60;!DOCTYPE&#62;</code> declaration is not case sensitive.</pre>
      <pre>The <code>&#60;!DOCTYPE&#62;</code>declaration for HTML5 is:</pre>
      <code>&#60;!DOCTYPE html></code>
      <h2>HTML Headings</h2>
      <pre>HTML headings are defined with the <code>&#60;h1&#62;</code> to <code>&#60;h6&#62;</code> tags.</pre>
      <pre><code>&#60;h1&#62;</code> defines the most important heading. <code>&#60;h6&#62;</code> defines the least important heading: </pre>
      <h3>Example:</h3>
      <pre><code>&#60;h1&#62;This is heading 1&#60;/h1&#62;
&#60;h2&#62;This is heading 2&#60;/h2&#62;
&#60;h3&#62;This is heading 3&#60;/h3&#62;></code></pre>
      <h2>HTML Paragraphs</h2>
      <p>HTML paragraphs are defined with the &#60;p&#62; tag:</p>
      <h3>Example:</h3>
      <pre><code>&#60;p&#62;This is a paragraph.&#60;/p&#62;
&#60;p&#62;This is another paragraph.&#60;/p&#62;</code></pre>
    </section>
    <section class="main-section" id="Elements">
      <header>Elements</header>
      <p>An HTML element is defined by a start tag, some content, and an end tag.</p>
  <p>&#60;tagname&#62;Content goes here...&#60;/tagname&#62;</p>
      <p>Examples of some HTML elements:</p>
      <pre>&#60;h1&#62My First Heading&#60;/h1&#62
&#60;p&#62;My first paragraph.&#60;/p&#62;</pre>
    </section>
     <section class="main-section" id="Attributes">
       <header>Attributes</header>
    <p>HTML attributes provide additional information about HTML elements.</p>
    <h2>HTML Attributes</h2>
    <ul>
      <li>All HTML elements can have attributes</li>
      <li>Attributes provide additional information about elements</li>
      <li>Attributes are always specified in the start tag</li>
      <li>Attributes usually come in name/value pairs like: name="value"
</li>
    </ul></section>
    <section class="main-section" id="Reference"><header>Reference</header>
      <ul>
        <li>All the documentation in this page is taken from<a target="_blank " href="https://www.w3schools.com/html/html_intro.asp"> w3schools</a></li>
      </ul>
    </section>
  </main>

              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Baloo+Tammudu+2&display=swap');

nav, .list1 {
   list-style-type: none;
  margin: 0;
  padding: 0;
  width: 10%;
  background-color: #f1f1f1;
  height: 100%; 
  position: fixed; 
  overflow: auto; 
  border-top: 1px solid;
  min-width: 290px;
}
nav .nav-link {
  display: block;
  padding: 10px 30px;
  color: #4d4e53;
  text-decoration: none;
  cursor: pointer;
}
.list1 .nav-link:hover {
  background-color: #555;
  color: white;
}


.list1 {
  border-right: 3px solid #555;
  font-size: 1.4em;
}
.nestli {
  text-align: center;
  border-bottom: 1px solid #555;
}
.nestli:last-child {
  border-bottom: none;
}
header {
  color: black;
  margin: 10px;
  font-size: 2.8em;
  font-weight: thin;
}
.html-header {
  font-size: 1.79em;
  text-align: center;
}
code {
  background-color: pink;
 line-height: 2;
  padding: 10px;
  border-radius: 5px;
}
section {
  margin-left: 340px;
}
main {
  background-color: lightgrey;
 font-family: 'Baloo Tammudu 2', cursive;
  display: block;
}


  @media (min-width:600px) {
  nav {
    width: 17%;
  }
    @media (max-width:599px) {
  nav li {
    display: block;
  }
}

 
    
   
              
            
!

JS

              
                
              
            
!
999px

Console