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

              
                <h1>Mick Mouse</h1>
<main>
  <div class="info">
    <h2>Where does he work?</h2>
    <p>Works for Walt Disney Lorem ipsum dolor sit amet consectetur, adipisicing elit. Pariatur, similique delectus quam quo illum saepe dolore commodi, impedit ullam vel corporis quos ipsam excepturi odio corrupti voluptas ipsum aut accusantium.</p>
  </div>
  <div class="info">
    <h2>Who does he love?</h2>
    <p>Loves wife Minnie Lorem ipsum dolor sit amet consectetur adipisicing elit. Expedita dolorem aliquid nam, natus laudantium impedit minus?</p>
  </div>
  <div class="info">
    <h2>What does he hate?</h2>
    <p>Hates cats this is a lot longer Lorem ipsum dolor sit amet consectetur adipisicing elit. Sed distinctio vero architecto modi quasi. Omnis sint modi dolore. Perferendis et dolorem dolore beatae dolores illum doloremque iste ad voluptatem eveniet?</p>
  </div>
  <div class="info">
    <h2>What does he Like?</h2>
    <p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Nostrum, dicta voluptates praesentium obcaecati eaque pariatur facere, eos facilis iusto labore placeat laboriosam, vero optio atque blanditiis quae sapiente! Itaque laboriosam labore sunt ut harum quaerat qui soluta architecto, magnam ullam.
    </p>
  </div>
</main>
              
            
!

CSS

              
                * {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: verdana;
}

h1 {
  text-align: center;
}

h2 {
  margin: 0;
  background: gray;
  color: white;
  padding: 5px;
}

p {
  margin: 2px 5px;
}

main {
  font-size: 80%;
  border: 1px solid green;
  padding: 12px;
  width: 75%;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  flex-direction: row;
  flex-wrap: wrap;
}

.info {
  border: 2px solid silver;
  margin: 12px;
  flex-basis: 280px;
}

@media screen and (max-width: 500px) {
  main {
    width: 100%;
  }
  .info {
    flex-basis: 100%;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console