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>
  <h1>Welcome to My Site</h1>
</header>

<main>
  <section>
    <p>Kinfolk pinterest fanny pack kogi yuccie. Vinyl normcore lo-fi, <a href="#">gluten-free knausgaard</a> post-ironic disrupt echo park irony austin neutra sartorial chillwave paleo narwhal. Pop-up knausgaard thundercats hammock master cleanse. Venmo etsy hoodie, tattooed mumblecore williamsburg forage crucifix cray. Helvetica freegan farm-to-table williamsburg tofu PBR&B. Dreamcatcher trust fund DIY, viral freegan PBR&B venmo. Gastropub polaroid drinking vinegar, next level man bun lo-fi gluten-free offal iPhone.</p>
    <p><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/9632/gene-3.gif"></p>
    <p>Banh mi tumblr hoodie vinyl. Brooklyn tote bag semiotics, tattooed retro health goth craft beer chicharrones microdosing tofu meh quinoa lomo taxidermy.</p>
    <p>Fingerstache lo-fi swag cray, pop-up biodiesel ennui aesthetic distillery tacos 8-bit. Street art brooklyn keytar actually. Cornhole synth shoreditch fashion axe etsy, viral bicycle rights hammock affogato heirloom mumblecore waistcoat before they sold out brooklyn. Blue bottle flannel skateboard, synth godard man braid chillwave art party YOLO. Lo-fi slow-carb skateboard salvia, next level sustainable letterpress banjo whatever intelligentsia knausgaard.</p>
  </section>
</main>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Rubik');

body {
  background: linear-gradient(135deg, #0f124a 0%, #1b2360 16%, #515b80 42%, #758391 58%, #e5e3b0 100%);
}

header {
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Rubik', sans-serif;
  font-size: 2em;
  height: 25vh;
  text-align: center;
}

main {
  display: flex;
  align-items: center;
  justify-content: center;
}

section {
  background-color: #fff;
  max-width: 45em;
  font-size: 1.25em;
  line-height: 1.5em;
  padding: 3em;
}

section a {
  color: #515b80;
}

section a:hover {
  text-decoration: none;
}

section img {
  border-bottom: 1px solid #eaeaea;
  border-top: 1px solid #eaeaea;
  padding: 1.5em 0;
  width: 100%;
}

@media all and (max-width: 600px) {
  header {
    font-size: 1.25em;
  }
  section {
    padding: 1em;
    background-color: transparent;
    color: #fff;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console