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

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.

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

              
                <header>
    <h1>h1 - Page Title</h1>
    <h2>h2 - And this is the sub heading</h2>
</header>
<main>
    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Explicabo ea nostrum aperiam nobis, eaque perferendis beatae cupiditate deserunt sit, voluptatibus minima suscipit deleniti at. Ipsa, rerum? Suscipit minus impedit fugit.</p>

    <h3>h3 - Section title</h3>
    <p>Habitant morbi tristique senectus et. Lorem ipsum dolor sit amet consectetur adipiscing elit. Egestas erat imperdiet sed euismod nisi. Ac tincidunt vitae semper quis lectus. Consectetur a erat nam at. Erat pellentesque adipiscing commodo elit at imperdiet.</p>

    <ul>
        <li>Scelerisque varius morbi enim nunc faucibus a</li>
        <li>Porttitor eget dolor morbi non arcu risus quis varius</li>
        <li>Posuere lorem ipsum dolor sit amet consectetur adipiscing elit duis</li>
    </ul>
</main>
              
            
!

CSS

              
                html {
    font-size: 16px; // 16px browser's default size
    line-height: 1.5;
    margin: 0 2rem;
}

@media only screen and (min-width: 720px) {
    html {
        font-size: 18px;
        background-color: lightgreen;
    }
}


@media only screen and (min-width: 960px) {
    html {
        font-size: 20px;
        background-color: lightgoldenrodyellow;
    }
}

@media only screen and (min-width: 1240px) {
    html {
        font-size: 24px;
        background-color: lightblue;    
    }
}

header {
    max-width: 50rem;
    margin: 2rem auto 3rem;
    border-bottom: solid 0.2rem rgba(0,0,0,0.2);
    padding-bottom: 1rem;
}

main {
    max-width: 70ch;
    margin: 0 auto;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 2rem; 
}

header h1, header h2 {
    margin: 0;
}
              
            
!

JS

              
                
              
            
!
999px

Console