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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

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

              
                <header id="main-header">
  <h1>ANIMAL NEWS</h1>
  <nav id="main-nav">
    <a href="">News</a>
    <a href="">Zoo Life</a>
    <a href="">Pets</a>
    <a href="">About Us</a>
    <a href="">Contact</a>
  </nav>
</header>
<div class="container">
  <section id="feature-cards">
    <div class="card card1">
      <div class="card-content">
        <h3>Quam Optio ab Modi!</h3>
        <p class="date">Nov 12, 2016</p>
      </div>
    </div>
    <div class="card card2">
      <div class="card-content">
        <h3>At Doloremque Aperiam Amet.</h3>
        <p class="date">Nov 2, 2016</p>
      </div>
    </div>
    <div class="card card3">
      <div class="card-content">
        <h3>Eveniet Consequuntur, Odit Laboriosam?</h3>
        <p class="date">Oct 30, 2016</p>
      </div>
    </div>
    <div class="card card4">
      <div class="card-content">
        <h3>Nihil Itaque Corporis Architecto Reprehenderit</h3>
        <p class="date">Oct 30, 2016</p>
      </div>
    </div>
    <div class="card card5">
      <div class="card-content">
        <h3>In fugit possimus maiores</h3>
        <p class="date">Oct 22, 2016</p>
      </div>
    </div>
    <div class="card card6">
      <div class="card-content">
        <h3>Rem Voluptate, Tempora Praesentium.</h3>
        <p class="date">Oct 12, 2016</p>
      </div>
    </div>
    <div class="card card7">
      <div class="card-content">
        <h3>Dolorem Doloribus Libero</h3>
        <p class="date">Oct 10, 2016</p>
      </div>
    </div>
  </section>
  <section id="feature-articles">
    <article class="feature">
      <img src="http://lorempixel.com/500/300/animals/8">
      <div class="feature-text">
        <h3>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</h3>
        <div class="feature-meta">
          <span class="category">Felines</span>
          <span class="author">Jimmy Frost</span>
          <span class="date">Nov 15, 2016</span>
        </div>
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nobis dolor enim mollitia a quasi sunt tempore, recusandae illo provident fugit distinctio ipsum odit porro neque tenetur earum quas eveniet quisquam.</p>
        <button>Read More</button>
      </div>
    </article>
    <article class="feature">
      <img src="http://lorempixel.com/500/300/animals/9">
      <div class="feature-text">
        <h3>Eos Quam Sint Molestias Perferendis Totam</h3>
        <div class="feature-meta">
          <span class="category">Pets</span>
          <span class="author">Jimmy Frost</span>
          <span class="date">Nov 10, 2016</span>
        </div>
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nobis dolor enim mollitia a quasi sunt tempore, recusandae illo provident fugit distinctio ipsum odit porro neque tenetur earum quas eveniet quisquam.</p>
        <button>Read More</button>
      </div>
    </article>
  </section>
  <aside id="sidebar">
    <h4 class="section-title"><span>Adopt a Pet</span></h4>
    <div class="pets">
      <div class="card">
        <img src="http://lorempixel.com/300/300/animals/9"/>
        <h4>Rover</h4>
      </div>
      <div class="card">
        <img src="http://lorempixel.com/300/300/animals/7"/>
        <h4>Whiskers</h4>
      </div>
      <div class="card">
        <img src="http://lorempixel.com/300/300/animals/6"/>
        <h4>Eugene</h4>
      </div>
    </div>
  </aside>
  <section id="archives">
    <h4 class="section-title"><span>In the Archives</span></h4>
    <div class="archive-cards">
      <div class="card card1">
        <h4>Perferendis Laboriosam Amet Eveniet</h4>
        <p class="date">Sept 28, 2016</p>
      </div>
      <div class="card card2">
        <h4>Deserunt Consequuntur Neque, Minus Quibusdam Sint.</h4>
        <p class="date">Sept 18, 2016</p>
      </div>
      <div class="card card3">
        <h4>Quibusdam Facere Quis Officia Consequuntur</h4>
        <p class="date">Sept 4, 2016</p>
      </div>
    </div>
  </section>
</div>
<footer id="main-footer">
  &copy;Copyright 2016
</footer>
              
            
!

CSS

              
                html, body { font-family: Arial, sans-serif; margin: 0; color: #333; }
h1,h2,h3,h4,h5,h6 { font-family: Georgia, serif; }

.section-title {
  border-bottom: 1px solid #333;
  font-weight: normal;
  font-family: Arial, sans-serif;
  font-size: 14px;
  margin-top: 4px;
}
.section-title span {
  background-color: #333;
  color: #fff;
  padding: 4px 8px;
  display: inline-block;
}

#main-header {
  text-align: center;
  border-bottom: 4px solid #c44c4c;
}
#main-header h1 {
  font-size: 60px;
  font-weight: normal;
  margin: 40px;
}

#main-nav {
  display: flex;
  justify-content: space-between;
  width: 740px;
  margin: 0 auto;
}
#main-nav a {
  text-decoration: none;
  font-family: Georgia, serif;
  color: #333;
  padding-bottom: 10px;
}
#main-nav a:hover { color: #c44c4c; }

.container {
  width: 740px;
  margin: 0 auto;
}

#feature-cards {
  padding-top: 20px;
  width: 740px;
  margin: 0 auto;
}
#feature-cards .card h3 {
  font-size: 14px;
  font-weight: normal;
  color: #fff;
  margin: 0;
}
#feature-cards .card p {
  margin: 0;
  color: #fff;
  font-size: 10px;
}
#feature-cards .card { text-align: center; }
#feature-cards .card1 {
  background: url('http://lorempixel.com/300/200/animals/1') center center no-repeat;
}
#feature-cards .card2 {
  background: url('http://lorempixel.com/300/200/animals/2') center center no-repeat;
}
#feature-cards .card3 {
  background: url('http://lorempixel.com/300/200/animals/3') center center no-repeat;
}
#feature-cards .card4 {
  background: url('http://lorempixel.com/300/200/animals/4') center center no-repeat;
}
#feature-cards .card5 {
  background: url('http://lorempixel.com/300/200/animals/5') center center no-repeat;
}
#feature-cards .card6 {
  background: url('http://lorempixel.com/300/200/animals/6') center center no-repeat;
}
#feature-cards .card7 {
  background: url('http://lorempixel.com/300/200/animals/7') center center no-repeat;
}
#feature-cards .card .card-content {
  background-color: rgba(30,30,30,.5);
  height: 100%;
}

#feature-articles .feature img {
  width: 100%;
}

.feature .feature-text {
  position: relative;
  top: -80px;
  padding: 10px 10px 10px 0;
  width: 90%;
  background-color: #fff;
}

.feature-text h3 {
  margin: 0;
  font-size: 28px;
}

.feature-text h3:hover {
  color: #c44c4c;
}

.feature-meta {
  margin: 8px 0;
  font-size: 12px;
}

.feature-meta .category {
  background-color: #333;
  color: #fff;
  padding: 2px 8px;
}

.feature-meta .author {
  font-weight: bold;
  margin: 0 8px;
}

.feature-meta .date {
  color: #999;
}

.feature p {
  font-size: 14px;
  color: #999;
}

.feature button {
  background-color: #c44c4c;
  border: none;
  color: #fff;
  padding: 4px 8px;
}

#sidebar .card {
  clear: both;
}
#sidebar .card h4 {
  float: right;
  background-color: #fff;
  position: relative;
  padding: 8px;
  top: -50px;
  margin-bottom: -30px;
}

.archive-cards h4 {
  color: #c44c4c;
  margin: 2px;
}
.archive-cards .date {
  margin: 0;
  font-size: 12px;
  color: #999;
}
#main-footer {
  background-color: #333;
  color: #fff;
  padding: 20px;
  text-align: center;
  font-size: 12px;
}
              
            
!

JS

              
                
              
            
!
999px

Console