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

              
                <main class="stack root">
  <article class="stack">
    <h1>Hello World!</h1>
    <div>
      Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam totam corporis molestiae odio iure soluta perspiciatis a dolorum possimus corrupti et, perferendis delectus dignissimos voluptatem ab minus magni vitae? Non?
    </div>
    <ul>
      <li>Tuna</li>
      <li>Salmon</li>
      <li>Tamago</li>
    </ul>
    <p>
      Reiciendis, quasi dicta. Praesentium laboriosam molestiae illo aspernatur ex esse optio voluptate voluptatum nihil assumenda sit quas deleniti quos quidem nisi maiores officiis pariatur, ipsa, unde facere similique sequi id!
    </p>
  </article>
  <article class="stack">
    <h1>Welcom to the New World!</h1>
    <div>
      Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam totam corporis molestiae odio iure soluta perspiciatis a dolorum possimus corrupti et, perferendis delectus dignissimos voluptatem ab minus magni vitae? Non?
    </div>
    <h3>Hey</h3>
    <p>
      Reiciendis, quasi dicta. Praesentium laboriosam molestiae illo aspernatur ex esse optio voluptate voluptatum nihil assumenda sit quas deleniti quos quidem nisi maiores officiis pariatur, ipsa, unde facere similique sequi id!
    </p>
    <p>
      Dolore dignissimos quaerat dolorem optio unde, maiores placeat iure exercitationem sed error aut doloribus, deleniti ipsa a libero magni nobis labore corrupti aspernatur neque harum officiis iusto repellat quae. Nemo.
    </p>
    <h3>Yo</h3>
    <p>
      Ipsam, eveniet? Qui ducimus odit adipisci dolorum, voluptatum reprehenderit pariatur vitae cupiditate accusamus sed distinctio at eaque assumenda ratione minus deleniti incidunt magnam, labore dolore ea et! Recusandae, asperiores ipsam?
      Maxime ipsam facilis nesciunt sapiente perspiciatis excepturi, soluta veritatis exercitationem est quos, neque labore vero fugiat? Praesentium odit iste laboriosam nostrum dolor delectus veritatis accusamus, culpa, harum, sapiente libero ex.
    </p>
  </article>
</main>
              
            
!

CSS

              
                .stack {
  border: thin block tomato;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  
  &.root {
    gap: 5rem;
  }
  
  & > * {
    margin-block: 0;
  }
}

main {
  margin-inline: auto;
  max-width: 40rem;
  padding-inline: 1rem;
}
              
            
!

JS

              
                
              
            
!
999px

Console