Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Out with the old...</title>
<link rel="stylesheet" href="path-to-style.css">
<meta name="description" content="We are going to refine this document down to a good starting point for all html5 projects moving forward." />
<meta name="author" content="Thomas Wallace" />
<link rel="shortcut icon" href="/favicon.ico" />
</head>
<body>
<main class="cf">
  <header class="primary">
    <h1>Out with the old...</h1>
    <h2>Beginning the transistion to HTML5</h2>
    <nav class="primary">
      <ul>
        <li><a href="#">LINK</a></li>
        <li><a href="#">LINK</a></li>
        <li><a href="#">LINK</a></li>
      </ul>
    </nav>
  </header>
  <section id="content">
    <section id="blog">
      <article class="post">
        <header>
        <time datetime="2024-1-25">January 25, 2024</time>
        <h1> <a href="#" rel="bookmark" title="link to this post">The Rebel Force</a> </h1>
        </header>  
        <p>Hey, Luke! May the Force be with you. Alderaan? I'm not going to Alderaan. I've got to go home. It's late, I'm in for it as it is. Obi-Wan is here. The Force is with him. What?! You don't believe in the Force, do you?</p>
        <h2>The Sith Lords</h2>
        <p>You're all clear, kid. Let's blow this thing and go home! I care. So, what do you think of her, Han? You are a part of the Rebel Alliance and a traitor! Take her away! You don't believe in the Force, do you?</p>
        <ul>
          <li>You are a part of the Rebel Alliance and a traitor! Take her away!</li>
          <li>Hey, Luke! May the Force be with you.</li>
          <li>What good is a reward if you ain't around to use it? Besides, attacking that battle station ain't my idea of courage. It's more like&hellip;suicide.</li>
        </ul>
        <footer class="post-meta"> Post Tags Go here.... </footer>
      </article>
      <article class="post">
        <header>
        <time datetime="2024-1-25">January 25, 2024</time>
        <h1> <a href="#" rel="bookmark" title="link to this post">The Rebel Force</a> </h1>
        </header>  
        <p>Hey, Luke! May the Force be with you. Alderaan? I'm not going to Alderaan. I've got to go home. It's late, I'm in for it as it is. Obi-Wan is here. The Force is with him. What?! You don't believe in the Force, do you?</p>
        <h2>The Sith Lords</h2>
        <p>You're all clear, kid. Let's blow this thing and go home! I care. So, what do you think of her, Han? You are a part of the Rebel Alliance and a traitor! Take her away! You don't believe in the Force, do you?</p>
        <ul>
          <li>You are a part of the Rebel Alliance and a traitor! Take her away!</li>
          <li>Hey, Luke! May the Force be with you.</li>
          <li>What good is a reward if you ain't around to use it? Besides, attacking that battle station ain't my idea of courage. It's more like&hellip;suicide.</li>
        </ul>
        <footer class="post-meta"> Post Tags Go here.... </footer>
      </article>
      <article class="post">
        <header>
        <time datetime="2024-1-25">January 25, 2024</time>
        <h1> <a href="#" rel="bookmark" title="link to this post">The Rebel Force</a> </h1>
        </header>  
        <p>Hey, Luke! May the Force be with you. Alderaan? I'm not going to Alderaan. I've got to go home. It's late, I'm in for it as it is. Obi-Wan is here. The Force is with him. What?! You don't believe in the Force, do you?</p>
        <h2>The Sith Lords</h2>
        <p>You're all clear, kid. Let's blow this thing and go home! I care. So, what do you think of her, Han? You are a part of the Rebel Alliance and a traitor! Take her away! You don't believe in the Force, do you?</p>
        <ul>
          <li>You are a part of the Rebel Alliance and a traitor! Take her away!</li>
          <li>Hey, Luke! May the Force be with you.</li>
          <li>What good is a reward if you ain't around to use it? Besides, attacking that battle station ain't my idea of courage. It's more like&hellip;suicide.</li>
        </ul>
        <footer class="post-meta"> Post Tags Go here.... </footer>
      </article>
    </section>
    <!--#primary -->
    <aside id="supporting-material">
      <article class="widget">
        <h1>Sample Sidebar Item </h1>
        <p>Quisque justo erat, varius placerat fermentum vel, iaculis vel ligula. Phasellus et elit purus. Curabitur ipsum enim, scelerisque vitae condimentum ac, cursus eget quam. Nullam volutpat dui ut risus pulvinar at fringilla sem tristique. Nulla facilisi. Donec posuere euismod purus, eu scelerisque risus pellentesque eu. Vestibulum sed tincidunt metus. <a href="#">Read More</a>&raquo;</p>
      </article>
      <article class="widget">
        <h1>Sample Sidebar Item </h1>
        <p>Quisque justo erat, varius placerat fermentum vel, iaculis vel ligula. Phasellus et elit purus. Curabitur ipsum enim, scelerisque vitae condimentum ac, cursus eget quam. Nullam volutpat dui ut risus pulvinar at fringilla sem tristique. Nulla facilisi. Donec posuere euismod purus, eu scelerisque risus pellentesque eu. Vestibulum sed tincidunt metus. <a href="#">Read More</a>&raquo;</p>
      </article>
      <article class="widget">
        <h1>Sample Sidebar Item </h1>
        <p>Quisque justo erat, varius placerat fermentum vel, iaculis vel ligula. Phasellus et elit purus. Curabitur ipsum enim, scelerisque vitae condimentum ac, cursus eget quam. Nullam volutpat dui ut risus pulvinar at fringilla sem tristique. Nulla facilisi. Donec posuere euismod purus, eu scelerisque risus pellentesque eu. Vestibulum sed tincidunt metus. <a href="#">Read More</a>&raquo;</p>
      </article>
    </aside>
    <!--#secondary --> 
  </section>
  <!--#content -->
  <footer class="primary">
    <p>&copy; 2024 <a href="#">Thomas Wallace</a></p>
  </footer>
</main>
<!--.container -->
</body>
</html>
              
            
!

CSS

              
                /* apply a natural box layout model to all elements, but allowing components to change */
html {
  box-sizing: border-box;
}
*,
*:before,
*:after {
  box-sizing: inherit;
}

.cf:before,
.cf:after {
    content: " "; /* 1 */
    display: table; /* 2 */
}

.cf:after {
    clear: both;
}

main{
width:80vw;  
display:grid;
grid-template-columns: repeat(10, [col-] 1fr);
grid-template-rows:auto;  
margin:auto;  
gap:20px;
border:1px solid #000;
padding:20px;  
}

header.primary{
  background: rgba(0, 0, 0, 0.4);
  grid-column: 1 / 11;
  grid-row: 1 / 2;
}

#content{
  grid-column: 1 / 11;
  grid-row: 2 / 3;
  display:grid;
  grid-template-columns: subgrid;
  grid-template-rows: subgrid;
}

footer.primary{
  background: rgba(0, 0, 0, 0.4);
  grid-column: 1 / 11;
  grid-row: 3 / 4;
}

#blog{
  background: rgba(0, 0, 0, 0.6);
  grid-column:1 / 8;
}

aside{
  background: rgba(0, 0, 0, 0.3);
  grid-column:8 / 11;
}
              
            
!

JS

              
                
              
            
!
999px

Console