css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


Save Automatically?

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

              <div class="ms-grid">
  <div class="ms-row hc">
    <div class="l-col-12-24 m-col-2-3">
      <h1>A header</h1>
      <h3>A subheader providing further context to an otherwise too generic title.</h3>
        This example shows the use of standard/defaul<span class="lightmagenta-c">t type styles. By default, all type is respon</span>sive and color is <code>#2F2F2F</code>. The header <code>&#60;h1&#62;</code> at desktop resolutions is 46px and scales down to 34px at mobile. The subheader is an <code>&#60;h3&#62;</code> and starts at 24px, scaling down to 20px for mobile. The body copy starts at 18px and scales down to 16px. The default line-height on body copy is 1.5em.
        The pink text in these paragraphs show where <span class="lightmagenta-c">a character per line (CPL) count of 45 starts</span> and subsequently ends at 90 characters. In theory, to maintain legibility and retention you would want your lines to wrap somewhere in the middle of the pink, leaving some on the first line and some on the second. This standard is quickly broken if you try and put paragraph text in a single page-wide column, or <code>.col-1-1</code>. An easy fix for this is to make sure paragraph text is always in a <code>.col-1-2</code> or smaller. This example is in a <code>.col-1-2</code> and then centered using either <code>.hc</code> or <code>.offset</code>.
      <p class="body-alt">
        If you prefer to use a smaller font-size you <span class="lightmagenta-c body-alt">may add <code>.body-alt</code> to your element. This will </span>start your body copy at 15px at desktop and 14px at mobile. Be careful about line-length with this font-size as you'll need a smaller column to adhere to CPL standards. Additionally, the default line-height on <code>.body-alt</code> is a tighter 1.25em to accomodate it's standard use as supporting text to images.
              body {
  margin-top: 12px;
code {
  padding: 1px 5px;
  font-size: 15px;
  border: 1px solid #767676;
  border-radius: 3px;
  background-color: #EEF;
  font-family: monospace, serif;
  _font-family: 'courier new', monospace;
.body-alt {
  code {
    font-size: 14px;
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................