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

              
                <header>
            <nav>
                <ul>
                    <li>Home</li>
                    <li>About</li>
                    <li>Contact</li>
                </ul>
            </nav>
        </header>
        <section id="mainContent">
            <article>
                <h2>Stay Connected</h2>
                <p>By simply leaving the cable plugged in. What did you think would happen when you unplugged it?</p>
            </article>
            <article>
                <h2>Breaking News</h2>
                <p>Have you heard about that new food challenge? You have 5 minutes to down a tray of concrete lasagna and replace all your fluids with soda.</p>
            </article>
            <article>
                <h2>Leading The Industry</h2>
                <p>We really synergize with your financial partners to hit the ground running and get the job done, and we've been doing it for 500 years.</p>
            </article>
            <article>
                <h2>I'm Starting To Get Tired</h2>
                <p>Starting this project at 1am was probably a bad decision.</p>
            </article>
        </section>
        <footer>
            <ul>
                <li>Footer stuff goes here</li>
                <li>Maybe some links?</li>
                <li>Or perhaps a tag cloud!</li>
            </ul>
        </footer>
              
            
!

CSS

              
                /* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
    display: block;
}
body {
    line-height: 1;
}
ol, ul {
    list-style: none;
}
blockquote, q {
    quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
    content: '';
    content: none;
}
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/*end reset*/

header {
    width:100%;
    padding:0 0 0 20px;
    height:50px;
    position:fixed;
    top:0;
    background:rgba(0,0,0,0.2);
    overflow:hidden;
}

header nav ul li {
    display:inline-block;
    font-family:arial, helvetica, sans-serif;
    font-size:1em;
    color:#eee;
    font-weight:bold;
    margin-right:25px;
    line-height:50px;
}

header ul li:last-of-type {
    margin-right: 0px;
}

section article {
    display:block;
    text-align: center;
    background: linear-gradient(#A00, #800);
    color:#eee;
    border-bottom:3px dashed #eee;
}

section h2 {
    font-size:2em;
    font-weight:bold;
    margin-bottom:15px;
}

section p {
    font-family:arial, helvetica, sans-serif;
    font-size:0.8em;
}

footer {
    width:100%;
    z-index:-1;
    position:fixed;
    left:0;
    bottom:0;
    display:block;
    padding:20px;
    color:#eee;
    text-align: center;
    background: linear-gradient(#000, #333);
    font-family:arial, helvetica, sans-serif;
}

/* breakpoints */
@media screen and (min-width: 1280px) {
    section article {
        height:300px;
        padding:100px 50px;
    }
    section article:last-of-type {
        margin-bottom:420px;
    }
    footer {
        height:380px;
    }
}

@media screen and (min-width: 1024px) and (max-width: 1279px) {
    section article {
        height:300px;
        padding:100px 50px;
    }
    section article:last-of-type {
        margin-bottom:420px;
    }
    footer {
        height:380px;
    }
}

@media screen and (min-width: 768px) and (max-width: 1023px) {
    section article {
        height:200px;
        padding:80px 50px;
    }
    section article:last-of-type {
        margin-bottom:420px;
    }
    footer {
        height:380px;
    }
}

@media screen and (max-width: 767px) {
    section article {
        height:300px;
        padding:80px 50px;
    }
    section article:last-of-type {
        margin-bottom:420px;
    }
    footer {
        height:380px;
    }
}
              
            
!

JS

              
                
              
            
!
999px

Console