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

              
                <body>
  <h1>Headline: you need to know this!</h1>
  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent finibus bibendum elit condimentum molestie. Integer dapibus eget enim a consequat. Vestibulum nec rhoncus odio, sed facilisis augue. Nulla congue eleifend nulla, at tincidunt sem auctor et. Vivamus dignissim bibendum quam, quis varius elit tempor ut.</p>
  <h2>First part of the story</h2>
  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent finibus bibendum elit condimentum molestie. Integer dapibus eget enim a consequat. Vestibulum nec rhoncus odio, sed facilisis augue.</p>
    <h3>This is one aspect</h3>
  <p>Vestibulum nec rhoncus odio, sed facilisis augue. Nulla congue eleifend nulla, at tincidunt sem auctor et. Vivamus dignissim bibendum quam, quis varius elit tempor ut. Nunc consequat, quam et vulputate posuere, metus risus varius orci, eget auctor sapien metus vel.</p>
  <h3>This is another aspect</h3>
  <p>Vivamus dignissim bibendum quam, quis varius elit tempor ut. Nunc consequat, quam et vulputate posuere, metus risus varius orci, eget auctor sapien metus vel.</p>
  <h2>Second part of the story</h2>
  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent finibus bibendum elit condimentum molestie. Integer dapibus eget enim a consequat. Vestibulum nec rhoncus odio, sed facilisis augue.</p>

</body>
              
            
!

CSS

              
                :root{
  --fs-1: clamp(1.00rem, calc(0.98rem + 0.13vw), 1.13rem);;
  --fs-2: clamp(1.25rem, calc(1.20rem + 0.25vw), 1.50rem);
  --fs-3: clamp(1.56rem, calc(1.48rem + 0.44vw), 2.00rem);
  --fs-4: clamp(1.95rem, calc(1.81rem + 0.71vw), 2.66rem)
}

h1{
  font-size: var(--fs-4);
  line-height: 1.2;
}

h2{
  font-size: var(--fs-3);
  line-height: 1.3;
}

h3{
  font-size: var(--fs-2);
  line-height: 1.4;
}

p{
  font-size: var(--fs-1);
  line-height: 1.5;
}



/*Styling unrelated to the example*/
@import url('https://fonts.googleapis.com/css2?family=Ubuntu&display=swap');

*{
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, html{
  height: 100%;
}

body{
  padding: var(--fs-3);
  
  color: #222222;
  
  font-family: 'Ubuntu', sans-serif;
  
  /*https://www.magicpattern.design/tools/css-backgrounds*/
  background-color: #DBDBDB;
  opacity: 1;
  background-image:  radial-gradient(#999999 1.4000000000000001px, transparent 1.4000000000000001px), radial-gradient(#999999 1.4000000000000001px, #DBDBDB 1.4000000000000001px);
  background-size: 56px 56px;
  background-position: 0 0,28px 28px;
}

body > * + *{
  margin-top: 1em
}
              
            
!

JS

              
                
              
            
!
999px

Console