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

              
                <header class="site-header">
  <div class="max-width">
    <h1 class="heading__primary">HTML Cheat Sheet</h1>
    <h2 class="heading__secondary">
      <div>Hyper</div>     
      <div>Text</div>
      <div>Markup</div>     
      <div>Language</div> 
    </h2>
    <nav class="toggle-nav">
      <a href="#" data-toggle="all" class="active">All</a>
      <a href="#" data-toggle="document">Document Elements</a>
      <a href="#" data-toggle="container">Container Elements</a>
      <a href="#" data-toggle="content">Content Elements</a>
    </nav>
  </div>
</header>

<main class="site-content">
  <article class="content-section" id="document">
    <header class="content-section__header">
      <div class="max-width">
        <h1 class="heading__tertiary">Document Elements</h1>
      </div>
    </header>

    <div class="max-width">
      <p class="description">Document elements create the basic outline of a website. While they are required to build a website, if you are building a website in CodePen you do not need to include these tags.
</p>
      <table class="content-section__table">
        <thead>
          <tr>
            <th>Tag</th>
            <th>Use</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td><code class="code code--pink">&lt;html&gt;&lt;/html&gt;</code></td>
            <td>Wraps around <strong>all</strong> of the content of a web page. Says that everything inside is marked-up with HTML.</td>
          </tr>
          <tr>
            <td><code class="code code--pink">&lt;head&gt;&lt;/head&gt;</code></td>
            <td>Wraps around information about a web page. Code in the <code>head</code> element is not visible on the page.</td>
          </tr>
          <tr>
            <td><code class="code code--pink">&lt;body&gt;&lt;/body&gt;</code></td>
            <td>Wraps around a the content in a web page. This is the visible part of the web page. When adding markup to CodePen you are adding code to the <code>body</code> element.</td>
          </tr>
        </tbody>
      </table>
    </div>
  </article>
  
  <article class="content-section" id="container">
    <header class="content-section__header">
      <div class="max-width">
        <h1 class="heading__tertiary">Container Elements</h1>
      </div>
    </header>

    <div class="max-width">
      <p class="description">Container elements wrap around chunks of content. Specific elements give extra meaning to the content while generic elements don’t give any additional meaning.</p>

      <h3 class="heading__quaternary">Specific Containers</h3>
      <table class="content-section__table">
        <thead>
          <tr>
            <th>Tag</th>
            <th>Use</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td><code class="code code--pink">&lt;header&gt;&lt;/header&gt;</code></td>
            <td>Holds the introduction content to an entire web page or section of content.</td>
          </tr>
          <tr>
            <td><code class="code code--pink">&lt;nav&gt;&lt;/nav&gt;</code></td>
            <td>Holds a group of links.</td>
          </tr>
          <tr>
            <td><code class="code code--pink">&lt;main&gt;&lt;/main&gt;</code></td>
            <td>Holds the main content of a web page, the stuff people are there to read.</td>
          </tr>
          <tr>
            <td><code class="code code--pink">&lt;section&gt;&lt;/section&gt;</code></td>
            <td>Wraps around a group of related content.</td>
          </tr>
          <tr>
            <td><code class="code code--pink">&lt;article&gt;&lt;/article&gt;</code></td>
            <td>Wraps around a group of content. Examples can be blog posts, news articles, or even individual comments.</td>
          </tr>
          <tr>
            <td><code class="code code--pink">&lt;aside&gt;&lt;/aside&gt;</code></td>
            <td>Wraps around groups of content that aren’t required to fully understand the main content of the page. An example would be content in a sidebar.</td>
          </tr>
          <tr>
            <td><code class="code code--pink">&lt;footer&gt;&lt;/footer&gt;</code></td>
            <td>Holds the footer content to an entire web page or section of content.</td>
          </tr>
        </tbody>
      </table>

      <h3 class="heading__quaternary">Generic Containers</h3>
      <table class="content-section__table">
        <thead>
          <tr>
            <th>Tag</th>
            <th>Use</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td><code class="code code--pink">&lt;div&gt;&lt;/div&gt;</code></td>
            <td>Creates a block element with no semantic meaning.</td>
          </tr>
          <tr>
            <td><code class="code code--pink">&lt;span&gt;&lt;/span&gt;</code></td>
            <td>Creates an inline element with no semantic meaning.</td>
          </tr>
        </tbody>
      </table>

      <p>For more information about block elements and inline elements visit the <a href="bit.ly/gcc-glossary" target="_blank">Glossary or Terms</a>.</p>
    </div>
  </article>
  <article class="content-section" id="content">
    <header class="content-section__header">
      <div class="max-width">
        <h1 class="heading__tertiary">Content Elements</h1>
      </div>
    </header>

    <div class="max-width">
      <p class="description">Content elements give meaning to the different types of content on a web page.</p>
      <table class="content-section__table">
        <thead>
          <tr>
            <th>Tag</th>
            <th>Use</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>
              <code class="code code--pink">&lt;h1&gt;&lt;/h1&gt;</code><br />
              <code class="code code--pink">&lt;h2&gt;&lt;/h2&gt;</code><br />
              <code class="code code--pink">&lt;h3&gt;&lt;/h3&gt;</code><br />
              <code class="code code--pink">&lt;h4&gt;&lt;/h4&gt;</code><br />
              <code class="code code--pink">&lt;h5&gt;&lt;/h5&gt;</code><br />
              <code class="code code--pink">&lt;h6&gt;&lt;/h6&gt;</code>
            </td>
            <td>Creates a hierarchy of headings with h1 being the largest and h6 being the smallest.</td>
          </tr>
          <tr>
            <td><code class="code code--pink">&lt;p&gt;&lt;/p&gt;</code></td>
            <td>Wraps around a paragraph of text.</td>
          </tr>
          <tr>
            <td><code class="code code--pink">&lt;a <span class="code--purple">href="<span class="code--blue">http://website.com</span>"</span>&gt;<span class="code--black">Link Text</span>&lt;/a&gt;</code></td>
            <td>An anchor element wraps around text to become a link. Requires the <code>href</code> attribute which specifies where the text links to.</td>
          </tr>
          <tr>
            <td><code class="code code--pink">&lt;blockquote&gt;&lt;/blockquote&gt;</code></td>
            <td>For quoted text, usually indents text from both sides.</td>
          </tr>
          <tr>
            <td><code class="code code--pink">&lt;ol&gt;&lt;/ol&gt;</code></td>
            <td>Wraps around a group of list items to create an ordered list.</td>
          </tr>
          <tr>
            <td><code class="code code--pink">&lt;ul&gt;&lt;/ul&gt;</code></td>
            <td>Wraps around a group of list items to create an unordered list.</td>
          </tr>
          <tr>
            <td><code class="code code--pink">&lt;li&gt;&lt;/li&gt;</code></td>
            <td>Creates an individual list item. All list items must be contained in either an ordered or unordered list element.</td>
          </tr>
          <tr>
            <td><code class="code code--pink">&lt;img <span class="code--purple">src="<span class="code--blue">image.jpg</span>" alt="<span class="code--blue">An Image</span>"</span> /&gt;</code></td>
            <td>Img elements are used to display images. Requires the <code>src</code> attribute which specifies the url of the image and the <code>alt</code> attribute which provides descriptive text. This is a self-closing tag.</td>
          </tr>
          <tr>
            <td><code class="code code--pink">&lt;br /&gt;</code></td>
            <td>A break tag inserts a line break in a chunk of text. Often used inside of a paragraph tag. This is a self-closing tag.</td>
          </tr>
          <tr>
            <td><code class="code code--pink">&lt;hr /&gt;</code></td>
            <td>A horizontal tag inserts a horizontal rule (line). This is a self-closing tag.</td>
          </tr>
        </tbody>
      </table>
    </div>
  </article>
</main>

<footer class="site-footer">
  <div class="max-width">
    <p>This site is for educational purposes in connection with the <a href="https://www.gswo.org/">Girl Scouts of Western Ohio</a>. All image rights are retained solely by the original sources. Learn more at <a href="http://girlscancode.io">Girls Can Code</a>.</p>
  </div>
</footer>
              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console