css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

              <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
<!DOCTYPE html>
<html lang="en" dir="ltr">
    <meta charset="utf-8">
    <link rel="stylesheet" type="text/css" href="style.css">
    <link href="https://fonts.googleapis.com/css?family=Roboto+Condensed" rel="stylesheet">
    <title>Basic HTML and HTML5</title>

  <nav id="navbar">
    <header>Basic HTML and HTML5</header>
      <a class="nav-link" href="#Introduction_to_HTML5_Elements"><li>Introduction to HTML5 Elements</li></a>
      <a class="nav-link" href="#Add_image_to_your_html"><li>Add image to your html</li></a>
      <a class="nav-link" href="#Link_to_External_Pages"><li>Link to External Pages</li></a>
      <a class="nav-link" href="#Link_to_Internal_Pages"><li>Link to Internal Pages</li></a>
      <a class="nav-link" href="#Turn_an_Image_into_a_Link"><li>Turn an Image into a Link</li></a>
      <a class="nav-link" href="#Create_a_Bulleted_Unordered_List"><li>Create a Bulleted Unordered List</li></a>
      <a class="nav-link" href="#Create_a_Bulleted_Ordered_List"><li>Create a Bulleted Ordered List</li></a>
      <a class="nav-link" href="#Create_a_Form_Element"><li>Create a Form Element</li></a>
      <a class="nav-link" href="#Reference"><li>Reference</li></a>


  <main id="main-doc">

    <section class="main-section" id="Introduction_to_HTML5_Elements">

      <header>Introduction to HTML5 Elements</header>
      <p>HTML5 introduces more descriptive HTML tags. These include:</p>
      <div class="container">
      <p>These tags make your HTML easier to read, and also help with Search Engine Optimization (SEO) and accessibility.</p>
      <p>The HTML <strong>< main ></strong> element represents the dominant content of the <strong>< body ></strong> of a document, portion of a document or application. The main content area consists of content that is directly related to or expands upon the central topic of a document, or the central functionality of an application.</p>

    <section class="main-section" id="Add_image_to_your_html">

      <header>Add image to your html</header>
      <p>You can add images to your website by using the img element, and point to a specific image's URL using the src attribute:</p>
      <code>< img src="https://www.your-image-source.com/your-image.jpg" ></code>
      <p>All img elements must have an alt attribute. The text inside an alt attribute is used for screen readers to improve accessibility and is displayed if the image fails to load.</p>
      <p><strong>Note:</strong> If the image is purely decorative, using an empty alt attribute is a best practice.</p>

    <section class="main-section" id="Link_to_External_Pages">

      <header>Link to External Pages</header>
      <p>You can use anchor elements to link to content outside of your web page. Anchor elements need a destination web address called href attribute. They also need anchor text. Here's an example:</p>
      <code>< a href="https://freecodecamp.org">this links to freecodecamp.org< /a ></code>
      <p> the major search engines use many metrics to determine the value of external links. Some of these metrics include:</p>
        <li>The trustworthiness of the linking domain.</li>
        <li>The popularity of the linking page.</li>
        <li>The relevancy of the content between the source page and the target page.</li>
        <li>The anchor text used in the link.</li>
        <li>The number of links to the same page on the source page.</li>
        <li>The number of root domains that link to the target page.</li>
        <li>The amount of variations that are used as anchor text to links to the target page.</li>
        <li>The ownership relationship between the source and target domains.</li>

    <section class="main-section" id="Link_to_Internal_Pages">
      <header>Link to Internal Pages</header>
      <p>To create an internal link, you assign a link's href attribute to a hash symbol # plus the value of the id attribute for the element that you want to internally link to, usually further down the page. You then need to add the same id attribute to the element you are linking to. An id is an attribute that uniquely describes an element. Below is an example of an internal anchor link and its target element:</p>
        <code>< a href="#contacts-header">Contacts< /a ></code>
      <div class="code_2lines">
        <code>< h2 id="contacts-header">Contacts< /h2 ></code>
      <p>When users click the Contacts link, they'll be taken to the section of the webpage with the Contacts header element.</p>

    <section class="main-section" id="Turn_an_Image_into_a_Link">

      <header>Turn an Image into a Link</header>
      <p>You can make elements into links by nesting them within an a element. Nest your image within an a element. Here's an example:</p>
      <code>< a href="#">< img src="https://bit.ly/fcc-running-cats" alt="Three kittens running towards the camera." >< /a ></code>
      <p>Remember to use # as you’re a element's href property in order to turn it into a dead link.</p>

    <section class="main-section" id="Create_a_Bulleted_Unordered_List">

      <header>Create a Bulleted Unordered List</header>
      <p>HTML has a special element for creating unordered lists, or bullet point style lists. Unordered lists start with an opening <strong>< ul ></strong> element, followed by any number of <strong>< li ></strong> elements. Finally, unordered lists close with a <strong>< /ul ></strong></p>
      <p>For example:</p>
      <p>Would create a bullet point style list of "milk" and "cheese".</p>

    <section class="main-section" id="Create_a_Bulleted_Ordered_List">

      <header>Create a Bulleted Ordered List</header>
      <p>HTML has another special element for creating ordered lists, or numbered lists.</p>
      <p>Ordered lists start with an opening <strong>< ol ></strong> element, followed by any number of <strong>< li ></strong> elements. Finally, ordered lists close with a <strong>< /ol ></strong></p>
      <p>For example:</p>


    <section class="main-section" id="Create_a_Form_Element">

      <header>Create a Form Element</header>
      <p>You can build web forms that actually submit data to a server using nothing more than pure HTML. You can do this by specifying an action on your form element.</p>
      <p>For example:</p>
      <code>< form action="/url-where-you-want-to-submit-form-data" >< /form ></code>


    <section class="main-section" id="Reference">
        <li>All the documentation in this page is taken from <a href="https://learn.freecodecamp.org/responsive-web-design/basic-html-and-html5" target="_blank">freecodecamp.org</a></li>


    font-family: 'Roboto Condensed', sans-serif;
    line-height: 1.8;

  background-color: black;
  border:3px solid gray;

  font-size: 25px;

#navbar header{
  color: #adadad;

#navbar ul{

#navbar li{
  color: #adadad;
  background-color: black;
  border:1px solid;
  list-style: none;

#navbar li:hover{
  background-color: white;
  color: black;

#navbar a{

  position: absolute;

#main-doc header{

.container ul{
  column-count: 3;
  column-gap: 0;

  text-align: left;
  position: relative;

@media only screen and (max-width: 815px) {
  #navbar ul{
  border:1px solid;
      margin: 0;
      border-bottom:2px solid;
    position: relative;
    margin-top: 500px;
@media only screen and (max-width: 400px) {

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

🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................