Pen Settings

HTML

CSS

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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                
    <div class="outer">
        <h1>This is a Beautiful Newspaper Headline</h1>
        <article>
            <h2>Get that type going</h2>
            <section>
                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, 
                sed do eiusmod tempor incididunt ut labore et dolore magna 
                aliqua.</p> 

                <p>Ut enim ad minim veniam, quis nostrud exercitation 
                ullamco laboris nisi ut aliquip ex ea commodo consequat.
                Duis aute irure dolor in reprehenderit in voluptate velit 
                esse cillum dolore eu fugiat nulla pariatur. </p>

                <p>voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint 
                occaecat cupidatat non proident, sunt in culpa qui officia 
                deserunt mollit anim id est laborum. </p>

                <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/2621168/keyboard.jpg" alt="Computer keyboard">

                <h3>Another headline</h3>

                <p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem 
                    accusantium doloremque laudantium, totam rem aperiam, eaque 
                    ipsa quae ab illo inventore veritatis et quasi architecto 
                    beatae vitae dicta sunt explicabo. Nemo enim ipsam 
                    voluptatem quia voluptas sit aspernatur aut odit aut fugit, 
                    sed quia consequuntur magni dolores eos qui ratione 
                    voluptatem sequi nesciunt. Neque porro quisquam est, qui 
                    dolorem ipsum quia dolor sit amet, consectetur, adipisci 
                    velit</p>

                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, 
                    sed do eiusmod tempor incididunt ut labore et dolore magna 
                    aliqua. Ut enim ad minim veniam, quis nostrud exercitation 
                    ullamco laboris nisi ut aliquip ex ea commodo consequat.
                    Duis aute irure dolor in reprehenderit in voluptate velit 
                    esse cillum dolore eu fugiat nulla pariatur. Excepteur sint 
                    occaecat cupidatat non proident, sunt in culpa qui officia 
                    deserunt mollit anim id est laborum
                    </p>
            </section>

            <h2 class="secondary">Let's see some more</h2>

            <section>

                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, 
                    sed do eiusmod tempor incididunt ut labore et dolore magna 
                    aliqua.</p> 
                
                <p>Ut enim ad minim veniam, quis nostrud exercitation 
                ullamco laboris nisi ut aliquip ex ea commodo consequat.
                Duis aute irure dolor in reprehenderit in voluptate velit 
                esse cillum dolore eu fugiat nulla pariatur. </p>

                <p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem 
                accusantium doloremque laudantium, totam rem aperiam, eaque 
                ipsa quae ab illo inventore veritatis et quasi architecto 
                beatae vitae dicta sunt explicabo. Nemo enim ipsam 
                voluptatem quia voluptas sit aspernatur aut odit aut fugit, 
                sed quia consequuntur magni dolores eos qui ratione 
                voluptatem sequi nesciunt. Neque porro quisquam est, qui 
                dolorem ipsum quia dolor sit amet, consectetur, adipisci 
                velit</p>

                <h3>All your base are belong to us!</h3>

                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, 
                sed do eiusmod tempor incididunt ut labore et dolore magna 
                aliqua. Ut enim ad minim veniam, quis nostrud exercitation 
                ullamco laboris nisi ut aliquip ex ea commodo consequat.
                Duis aute irure dolor in reprehenderit in voluptate velit 
                esse cillum dolore eu fugiat nulla pariatur. Excepteur sint 
                occaecat cupidatat non proident, sunt in culpa qui officia 
                deserunt mollit anim id est laborum</p>


                <p class="span-all">This is some cool, important text?</p>
        
                <p>voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint 
                occaecat cupidatat non proident, sunt in culpa qui officia 
                deserunt mollit anim id est laborum. </p>

                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, 
                        sed do eiusmod tempor incididunt ut labore et dolore magna 
                        aliqua.</p> 
                    
                    <p>Ut enim ad minim veniam, quis nostrud exercitation 
                    ullamco laboris nisi ut aliquip ex ea commodo consequat.
                    Duis aute irure dolor in reprehenderit in voluptate velit 
                    esse cillum dolore eu fugiat nulla pariatur. </p>
            </section>
        </article>
    </div>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Lato|Prata&display=swap');

body {
    margin: 0;
    background: rgb(15,15,15);
    color: white;
    text-align: center;
}

h1, h2, h3 {
    font-family: 'Prata';
    margin-top: 0;
    margin-bottom: 2em;
}

h3 {
    color: rgb(199,199,199);
}

p {
    font-family: 'Lato';
    color: rgb(160, 160, 160);
    margin-top: 0;
}
.outer {
    padding: 1em;
}
section {
    column-count: 1;
    column-gap: 2em;
}

img {
    width: 80%;
    margin: 1em 0 0;
}

@media only screen and (min-width: 768px) {

    body {
        text-align: left;
        font-size: 18px;
    }
    p {
        line-height: 1.6em;
    }
    section {
        column-count: 2;
        column-rule-style: solid;
        column-rule-color: rgb(43,43,43);
    }
    section > * {
        margin-top: 0;
    }

    h1 {
        font-size: 3rem;
        margin: 2em 0 1em;
    }

    .outer {
        padding: 4em;
    }

    article {
        padding: 2em;
        background: #181818;
    }

    h2 {
        display: inline-block;
        position: relative;
        z-index: 1;

        &::before {
            content: ' ';
            position: absolute;
            width: 30%;
            height: 10px;
            z-index: -1;
            bottom: -.3em;
            left: -2em;
            background: purple;
            border-radius: 1em;
        }
    }

    .secondary {
        margin-top: 2em;
    }

    img {
        width: 100%;
    }

    h3 {
        color: rgb(199,199,199);
        margin: 1.5em 0 1em;
    }

    p.span-all {
        column-span: all;
        font-size: 1.6em;
        padding: .5em;
        margin: 2em 0;
        color: white;
        text-align: center;
    }

}


@media only screen and (min-width: 1100px) {
    .outer {
        margin: 0 auto;
        width: 80%;
    }
    section {
        column-count: 3;
    }
}
              
            
!

JS

              
                
              
            
!
999px

Console