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


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


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.


    <title>Constructive &amp; Co.</title>
    <h1>Constructive &amp; Co.</h1>
    <p>For all orders and inquiries please call <em>555-3344</em></p>


                /* CSS for adding content example */

@import url(;

body { 
    font-family: "Courier New", Courier, monospace;
    background: url("") no-repeat center center fixed; 
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    margin: 0;
    padding: 0;}

h1, h3, p {
    float: left;
    clear: left;
    width: 320px;
    background-color: #fff;
    color: #5a514c;
    text-align: center;}

h1 {
    margin: 50px 0 0 50px;
    height: 175px;
    background-image: url("");
    background-repeat: no-repeat;
    text-indent: -9999px;
    border-top: 1px solid #bcbdc0;
    border-left: 1px solid #bcbdc0;
    border-right: 1px solid #bcbdc0;}

h3 {
    margin: 0 0 0 50px;
    padding: 25px 0 0 0;
    font-family: 'Open Sans', arial, sans-serif;
    font-size: 1.8em;
    font-style: italic;
    font-weight: 800;
    line-height: 0.80em;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    border-left: 1px solid #bcbdc0;
    border-right: 1px solid #bcbdc0;}

p {
    margin: 0 0 0 50px;
    padding: 30px 0 25px 0;
    font-weight: bold;
    text-align: center;
    border-right: 1px solid #bcbdc0;
    border-bottom: 1px solid #bcbdc0;
    border-left: 1px solid #bcbdc0;}

/* Border under box when you move script in the last example */
p + script + h3 {
    padding-bottom: 20px;
    border-bottom: 1px solid #bcbdc0;}

/* Fix for full-screen background image: Chrome on Android */


                var today = new Date();
var hourNow = today.getHours();
var greeting;

if (hourNow > 18) {
    greeting = 'Good evening!';
} else if (hourNow > 12) {
    greeting = 'Good afternoon!';
} else if (hourNow > 0) {
    greeting = 'Good morning!';
} else {
    greeting = 'Welcome!';

document.write('<h3>' + greeting + '</h3>');