Pen Settings



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


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


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.


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.


                <div class="topnav">
  <nav id="navbar">
    <ul id="ul1">
      <a class="nav-link" href="#What_is_HTML?">What is HTML?</a>
      <a class="nav-link" href="#HTML_basics">HTML basics</a>
      <a class="nav-link" href="#HTML_Documents">HTML Documents</a>
      <a class="nav-link" href="#Elements">Elements</a>
      <a class="nav-link" href="#Headings">Headings</a>
      <a class="nav-link" href="#Paragraphs">Paragraphs</a>
      <a class="nav-link" href="#HTML_display">HTML display</a>
      <a class="nav-link" href="#Formatting_Elements">Formatting Elements</a>
<main id="main-doc">
  <section class="main-section" id="What_is_HTML?">
    <header>What is HTML?</header>
    <p>HTML or Hyper Text Markup Language is the standard markup language for documents designed to be displayed in a web browser. </p>

  <section class="main-section" id="HTML_basics">
    <header>HTML basics</header>
        <p>HTML describes the structure of a website</p>
        <p>HTML consists of a series of labels</p>
        <p>HTML elements label pieces of content and tell the browser how to display the content</p>

  <section class="main-section" id="HTML_Documents">
    <header>HTML Documents</header>
    <p>All HTML documents must start with a document type declaration: <code>
        !DOCTYPE html</code> The HTML document itself begins with <code> <html>
      </code> and ends with <code> "< /html>" </code></p>

  <section class="main-section" id="Elements">
    <p>HTML Elements consist of everything from the start to the end of the tag. Example <code>"< tagname>"</code> content goes here <code> "<tagname>"</code>. The <code> "<html>"</code> element is the root element and it defines the whole HTML document. It has a start tag <code>"<html>"</code> and an end tag <code>"</html>".</code>

  <section class="main-section" id="Headings">
    <p>HTML headings are defined with the "< h1>" to "< h6>" tags. The "< h1>" tag defines the most important heading. While the "< h6>" tag defines the least important heading. Headings are important to use to show document structure.</p>
  <section class="main-section" id="Paragraphs">
    <p>The HTML tag "< p>" defines a paragraph. Paragraphs always start on a new line and usually is a block of text.</p>
  <section class="main-section" id="HTML_display">
    <header>HTML display</header>
    <p>You cannot be sure how HTML will be displayed. Large screens, small screens, and resized windows will all have different results. Adding extra spaces or extra lines in your HTML code will not change the display.</p>

  <section class="main-section" id="Formatting_Elements">
    <header>Formatting Elements</header>
    <p>Formatting elements are used to display special types of text.
      <li> "< b>" is used for bold text.</li>
      <li> "< strong>" is used for important text.</li>
      <li> "< I>" is used for italic text</li>
      <li> "< em>" is used for emphasized text</li>


                body {
  background-color: cornsilk;
  min-width: 290px;
  font-size: 20px;
  font-family: 'Courier New'
.topnav {
  overflow: hidden;
  position: fixed;
  top: 0px;
  width: 100%;
  border-right: solid;
  border-color: cadetblue;
.topnav a {
  float: left;
  display: block;
  color: cadetblue;
  text-align: center;
  padding: 14px 16px;
  text-decoration: underline;
header {
  color: black;
  margin: 15px;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
#navbar ul {
 list-style-type: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: #333
#navbar li {
  float: left;
#navbar a {
 display: block;
  color: teal;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;

#main-doc {
  position: absolute;
  margin-left: 310px;
  padding: 10px;
  margin-bottom: 100px;
.main {
  margin-top: 30px; 

@media screen and (max-width: 600px) {
  .topnav a:not(:first-child) {display: none;}
  .topnav a.icon {
    float: right;
    display: block;

@media screen and (max-width: 600px) {
  .topnav.responsive {position: relative;}
  .topnav.responsive .icon {
    position: absolute;
    right: 0;
    top: 0;


                // !! 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. 

  - Select the project you would 
    like to complete from the dropdown 
  - Click the "RUN TESTS" button to
    run the tests against the blank 
  - 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.