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

              
                <!-- This is purely for reference and still in early stages. Don't use the code as is. Thanks!

 Proposal post: https://make.wordpress.org/design/2019/10/11/proposal-a-consistent-type-scale-for-wordpress/
-->

<div class="text-title-large">Title Large</div>
<div class="text-title-medium">Title Medium</div>
<div class="text-title-small">Title Small</div>
<div class="text-subtitle">Subtitle</div>
<div class="text-subtitle-small">Subtitle Small</div>
<div class="text-body">Body</div>
<div class="text-body-small">Body Small</div>
<div class="text-button">Button</div>
<div class="text-caption">Caption</div>
<div class="text-label">Label</div>

<hr />

<p class="text-body"> Body Lorem ipsum dolor sit amet, consectetur adipiscing elit. <strong>Emphasis</strong> Nam condimentum tempus diam, ultricies sollicitudin erat facilisis eget. Vestibulum rhoncus dui vel eros laoreet consectetur. Vivamus eget elementum ligula, vitae pharetra quam. Nullam at ligula sed metus accumsan vehicula. Vestibulum aliquam eget purus in tincidunt. Maecenas id gravida ipsum. Morbi nec erat eu odio molestie viverra eu eget erat. In nec nunc mi. Phasellus tincidunt a risus eu commodo. Vestibulum sit amet massa mollis, tempor ante in, accumsan nulla. Donec dignissim enim at enim convallis laoreet.</p>

<p class="text-body-small"> Body small Lorem ipsum dolor sit amet, consectetur adipiscing elit. <strong>Emphasis</strong> Nam condimentum tempus diam, ultricies sollicitudin erat facilisis eget. Vestibulum rhoncus dui vel eros laoreet consectetur. Vivamus eget elementum ligula, vitae pharetra quam. Nullam at ligula sed metus accumsan vehicula. Vestibulum aliquam eget purus in tincidunt. Maecenas id gravida ipsum. Morbi nec erat eu odio molestie viverra eu eget erat. In nec nunc mi. Phasellus tincidunt a risus eu commodo. Vestibulum sit amet massa mollis, tempor ante in, accumsan nulla. Donec dignissim enim at enim convallis laoreet.</p>


              
            
!

CSS

              
                body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  max-width: 40em;
  margin: 60px auto;
}

strong {
  font-weight: 600;
}

div {
  margin-bottom: 20px;
}

.text-title-large {
  font-weight: 400;
  font-size: 32px;
  line-height: 40px;
}

.text-title-medium {
  font-weight: 400;
  font-size: 24px;
  line-height: 32px;
}

.text-title-small {
  font-weight: 400;
  font-size: 20px;
  line-height: 28px;
}

.text-subtitle {
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
}

.text-subtitle-small {
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
}

.text-body {
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
}

.text-body-small {
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
}

.text-button {
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
}

.text-caption {
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
}

.text-label {
  font-weight: 600;
  font-size: 12px;
  line-height: 16px;
}

              
            
!

JS

              
                
              
            
!
999px

Console