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

              
                <section>
  <div class="container">
    <div class="article-text">
    <p>
      Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras convallis sodales erat vel accumsan. Nam eget massa nec sem vulputate ullamcorper vel quis justo. Duis rhoncus tempor tempus. Nulla facilisi. Maecenas nulla ante, lacinia ac consectetur non, aliquet sollicitudin libero. Quisque congue odio sodales dui fermentum ac laoreet mauris eleifend. Nulla facilisi. Phasellus vel erat a ante pharetra pharetra.   
      </p>
      <p>
        Donec fringilla sem at eros vulputate tempus. Maecenas interdum leo a tortor lobortis in hendrerit est pellentesque. Vestibulum non leo et nisi sollicitudin rutrum. Aliquam tristique dui tempor sapien molestie mollis. Integer viverra faucibus nulla ut posuere. Sed quis dui dictum tortor imperdiet imperdiet ut scelerisque augue. Aenean sit amet libero sit amet metus pulvinar viverra et id tortor. Nulla iaculis bibendum nisi, quis elementum risus tempus et.
      </p>
    </div>
  </div>
</section>
              
            
!

CSS

              
                .container {
  min-height: 400px;
  container: test/block-size;
  /* block size not integrated in canary as of this point :( */
}

@container test (min-height: 300px) {
  .article-text {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.4rem;
  }
}

/* some basic styling */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Lato', sans-serif;
  font-size: 1.2rem;
  line-height: 1.5;
  color: #FEFEFE;
  background: #1f2937;
}

img {
  max-width: 100%;
  margin: 0;
}

h1 {
  margin: 0 0 16px 0;
  font-family: 'Merriweather', serif;
  font-size: 2rem;
}

h2 {
  margin: 0 0 8px 0;
  font-family: 'Merriweather', serif;
  font-size: 1.4rem;
}

p {
  margin: 0 0 24px 0;
}

a {
  color: darkorange;
}

.demo-intro {
  font-size: 1.5rem;
  background: #111827;
}

.demo-intro p {
  margin: 0;
}

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 40px 20px;
}
              
            
!

JS

              
                
              
            
!
999px

Console