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

              
                <html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Technical Documentation</title>
    <link href="https://fonts.googleapis.com/css?family=Pacifico" rel="stylesheet" type="text/css">
    <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
  </head>
  <nav id="navbar">
    <header>HTML Documentation</header>
    <ul>
    <li><a href="#Html_Introduction" class="nav-link">Html Introduction</a></li>
    <li><a href="#Code_Editors" class="nav-link">Code Editors</a></li>
    <li><a href="#The_Inline_code_element" class="nav-link">The Inline code element</a></li>
    <li><a href="#Html_Basic" class="nav-link">Html Basic</a></li>
    <li><a href="#Html_Headings" class="nav-link">Html Headings</a></li>
    </ul>
  </nav>
  <main id="main-doc">
    <section class="main-section" id="Html_Introduction">
      <header>Html Introduction</header>
      <p>HTML (HyperText Markup Language) is the most basic building block of the Web. It defines the meaning and structure of web content. Other technologies besides HTML are generally used to describe a web page's appearance/presentation (CSS) or functionality/behavior (JavaScript).</p>
      <p>"Hypertext" refers to links that connect web pages to one another, either within a single website or between websites. Links are a fundamental aspect of the Web. By uploading content to the Internet and linking it to pages created by other people, you become an active participant in the World Wide Web.
</p>
      <ul>
        <li>HTML stands for hypertext 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>
       </ul>
    </section>
    <section class="main-section" id="Code_Editors">
      <header>Code Editors</header>
      <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).</p>
      <p>We believe in that using a simple text editor is a good way to learn HTML.</p>
    </section>
    <section class="main-section" id="The_Inline_code_element">
      <header>The Inline code element</header>
      <p>The HTML <span>code</span> element displays its contents styled in a fashion intended to indicate that the text is a short fragment of computer code.</p>
      <p>The <code>push()</code> method adds one or more elements to the end of an array and returns the new length of the array.</p>
      <p>The function <code>selectAll()</code> highlights all the text in the
input field so the user can, for example, copy or delete the text.</p>
 <p>a further inline <code>
x = 5; y = 6; z = x + y; </code> element example.</p>
      <p>The HTML <code>button</code> tag defines a clickable button.</p>
      <p>The CSS <code>background-color</code> property defines the background color of an element.</p>
      
    </section>
    <section class="main-section" id="Html_Basic">
      <header>Html Basic</header>
      <h3>html documents</h3>
      <p>All HTML documents must start with a document type declaration:<span>!Doctype Html</span></p>
      <p>The HTML document itself begins with <span> html </span> and ends with <span>/html</span>.</p>
    </section>
    <section class="main-section" id="Html_Headings">
      <header>Html Headings</header>
      <p>HTML headings are defined with the <span>h1</span> to <span>h6</span> tags.</p>
      <p><span>h1</span>defines the most important heading. <span>h6</span> defines the least important heading: </p>
    </section>
  </main>

              
            
!

CSS

              
                body{
  background:#fff7e6;
}

#navbar {
  float:left;
  width:200px;
  margin:0;
  padding:10px;
}

#navbar header{
  text-align:center;
  border-bottom: 1px solid;
  width:235px;
  margin-left:-44px;
}

#navbar ul{
  height:100%;  
}

#navbar li{
  list-style-type:none;
  border-bottom:1px solid;
  padding-bottom:20px;
  width:210px;
  margin-left:-60px;
}

#navbar a {
  display: block;
  text-decoration:none;
  text-align:center;
  color: rgba(0, 22, 22, 0.4);
  width:160px;
  padding:10px;
}

header{
  font-size: 1.8em;
  font-weight:thin;  
}

#main-doc{
  margin-left:200px;
  padding:10px;
  border-left:solid;
}

span{
  font-style:italic;
}

code {
  display: block;
  text-align: left;
  white-space: pre-line;
  position: relative;
  word-break: normal;
  word-wrap: normal;
  line-height: 2;
  background-color: #f7f7f7;
  padding: 15px;
  margin: 10px;
  border-radius: 5px;
}

/* smartphones, iPhone, portrait 480x320 phones */
  @media only screen and (min-width:320px) and (max-width:480px){
        #navbar{
            width:40%;
        }

        #navbar header{
            font-size:1em;
            font-weight:100;
            width:156px;
        }

        #navbar li{
            width:130px;
        }

        #navbar a{
            width:120px;
            padding:2px;
        }

        #main-doc{
            margin-left:120px;
        }
  }

/* big landscape tablets, laptops, and desktops */
  @media only screen and (min-width:961px) and (max-width:1025px){

        #navbar a{
            font-size:1.4em;
            padding:20px;
        }

        #main-doc{
            font-size:1.4em;
        }
  }
              
            
!

JS

              
                // !! IMPORTANT README:

// You may add additional external JS and CSS as needed to complete the project, however the current external resource MUST remain in place for the tests to work. BABEL must also be left in place. 

/***********
INSTRUCTIONS:
  - Select the project you would 
    like to complete from the dropdown 
    menu.
  - Click the "RUN TESTS" button to
    run the tests against the blank 
    pen.
  - Click the "TESTS" button to see 
    the individual test cases. 
    (should all be failing at first)
  - Start coding! As you fulfill each
    test case, you will see them go   
    from red to green.
  - As you start to build out your 
    project, when tests are failing, 
    you should get helpful errors 
    along the way!
    ************/

// PLEASE NOTE: Adding global style rules using the * selector, or by adding rules to body {..} or html {..}, or to all elements within body or html, i.e. h1 {..}, has the potential to pollute the test suite's CSS. Try adding: * { color: red }, for a quick example!

// Once you have read the above messages, you can delete all comments. 

              
            
!
999px

Console