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>
  <section class="jumbotron">
    <h1>Lorem, ipsum.</h1>
    <p>Lorem ipsum dolor sit amet.</p>
  </section>
</header>
<main>
  <div id="content">
    <article>
      <h2 class="title">Lorem, ipsum dolor</h2>
      <p class="subtitle">Author: lorem ipsum | DD-MM-YYYY</p>
      <div class="preview">
        <img src="https://dummyimage.com/600x600/b5b3b5/fff" alt="thumbnail" />
        <p>
          Lorem ipsum dolor sit amet consectetur adipisicing elit. Esse
          optio quibusdam a mollitia? Unde nulla segalahal deleniti quis.
          Iure, inventore. Illum repellendus nisi soluta omnis eos
          architecto dolorem illo amet? Nobis fugit beatae modi voluptas
          distinctio magni, consectetur cupiditate enim facere neque quam
          doloremque suscipit laboriosam ipsam praesentium corporis quis
          molestiae, consequuntur dolorem. Omnis possimus totam modi
          aspernatur, quaerat quidem dolorum consequuntur segalahal, ab
          tenetur repudiandae et doloribus facilis?
          <span class="link"><a href="#">Read More...</a></span>
        </p>
      </div>
    </article>
    <article>
      <h2 class="title">Lorem, ipsum dolor</h2>
      <p class="subtitle">Author: lorem ipsum | DD-MM-YYYY</p>
      <div class="preview">
        <img src="https://dummyimage.com/600x600/b5b3b5/fff" alt="thumbnail" />
        <p>
          Lorem ipsum dolor sit amet consectetur adipisicing elit. Esse
          optio quibusdam a mollitia? Unde nulla segalahal deleniti quis.
          Iure, inventore. Illum repellendus nisi soluta omnis eos
          architecto dolorem illo amet? Nobis fugit beatae modi voluptas
          distinctio magni, consectetur cupiditate enim facere neque quam
          doloremque suscipit laboriosam ipsam praesentium corporis quis
          molestiae, consequuntur dolorem. Omnis possimus totam modi
          aspernatur, quaerat quidem dolorum consequuntur segalahal, ab
          tenetur repudiandae et doloribus facilis?
          <span class="link"><a href="#">Read More...</a></span>
        </p>
      </div>
    </article>
  </div>
</main>
              
            
!

CSS

              
                * {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
}

.jumbotron {
  min-height: 200px;
  background-color: lavender;
  padding: 50px;
}

h1 {
  margin-bottom: 20px;
  font-size: 3em;
}

main {
  display: flex;
}

#content {
  width: 100%;
  padding: 20px;
}

#content article {
  padding: 20px;
  margin-bottom: 20px;
  border: solid 1px gray;
  border-radius: 20px;
}

h2.title {
  margin-bottom: 3px;
}

p.subtitle {
  font-size: smaller;
  color: gray;
  margin-bottom: 15px;
}

span.link a {
  text-decoration: none;
  font-weight: bold;
  color: darkcyan;
  margin-left: 5px;
}

.preview {
  display: flex;
}

.preview > img {
  width: 150px;
  height: 150px;
  margin-right: 10px;
}

@media screen and (max-width: 480px) {
  .preview {
    display: flex;
    flex-direction: column;
  }
  .preview > img {
    width: 100%;
    height: 100%;
    align-self: center;
    margin-bottom: 10px;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console