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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <article>
  <header>
    <h1>But Will It Make You Happy?</h1>
    <time datetime="2010-08-07 11:11:03-0400" pubdate>08-07-2010</time>
    <p>By <span class="fn">Stephanie Rosenbloom</span></p>
  </header>

  <main>
    <p>A two-bedroom apartment. Two cars. Enough wedding china to serve two dozen people.</p>
    <p>Yet Tammy Strobel wasn’t happy. Working as a project manager with an investment management firm in Davis, Calif., and making about $40,000 a year, she was, as she put it, caught in the “work-spend treadmill.”</p>

    <p>Inspired by books and blog entries about living simply, Ms. Strobel and her husband, Logan Smith, both 31, began donating some of their belongings to charity. As the months passed, out went stacks of sweaters, shoes, books, pots and pans, even the
      television after a trial separation during which it was relegated to a closet. Eventually, they got rid of their cars, too. Emboldened by a Web site that challenges consumers to live with just 100 personal items, Ms. Strobel winnowed down her wardrobe
      and toiletries to precisely that number.</p>

    <p>Today, three years after Ms. Strobel and Mr. Smith began downsizing, they live in Portland, Ore., in a spare, 400-square-foot studio with a nice-sized kitchen. Mr. Smith is completing a doctorate in physiology; Ms. Strobel happily works from home
      as a Web designer and freelance writer. She owns four plates, three pairs of shoes and two pots. With Mr. Smith in his final weeks of school, Ms. Strobel’s income of about $24,000 a year covers their bills. They are still car-free but have bikes.
      One other thing they no longer have: $30,000 of debt.</p>

    <p>Ms. Strobel’s mother is impressed. Now the couple have money to travel and to contribute to the education funds of nieces and nephews. And because their debt is paid off, Ms. Strobel works fewer hours, giving her time to be outdoors, and to volunteer,
      which she does about four hours a week for a nonprofit outreach program called Living Yoga.</p>

    <p>“The idea that you need to go bigger to be happy is false,” she says. “I really believe that the acquisition of material goods doesn’t bring about happiness.”</p>

    <figure>
      <img src="https://static01.nyt.com/images/2010/08/08/business/CONSUME/CONSUME-jumbo.jpg" alt="Portrait of Tammy Strobel" />
      <figcaption>Viktor Koen</figcaption>
    </figure>

    <h2></h2>

    <p>“One home was close to hiking trails, making going hiking very easy,” he said in an e-mail. “Thinking about the research, I argued that the hiking trails could be a factor contributing to our happiness, and we should worry less about things like how
      pretty the kitchen floor is or whether the sinks are fancy. We bought the home near the hiking trail and it has been great, and we haven’t tired of this feature because we take a walk four or five days a week.”</p>
    <p>Scholars have discovered that one way consumers combat hedonic adaptation is to buy many small pleasures instead of one big one. Instead of a new Jaguar, Professor Lyubomirsky advises, buy a massage once a week, have lots of fresh flowers delivered
      and make phone calls to friends in Europe. Instead of a two-week long vacation, take a few three-day weekends..</p>

    <figure>
      <img src="https://static01.nyt.com/images/2010/08/08/business/JP.-CONSUME-1/JP.-CONSUME-1-jumbo.jpg" />
      <figcaption>Roko Belic, a filmmaker, moved from San Francisco to a trailer park in Malibu and now surfs often. He is working on a documentary about happiness.</figcaption>
    </figure>

  </main>

  <aside>
    <h2>Share this Article</h2>
    <ul>
      <li><a href="/">Facebook</a></li>
      <li><a href="/">Twitter</a></li>
      <li><a href="/">Reddit</a></li>
    </ul>
  </aside>

  <footer>
    <h2>Comments <span>(3)</span></h2>
    <section>
      <ul>
        <li>
          <span>BruceFromCornwall2010</span>
          <time datetime="2010-08-07 11:11:03-0400" pubdate>08-07-2010</time>
          <p>Cool Story.</p>
          
          <ul>
            <li>
              <span>RunescapeBoy1991</span>
              <time datetime="2010-08-07 12:11:03-0400" pubdate>08-07-2010</time>
              <p>+1</p>
            </li>
          </ul>
        </li>
        
        <li>
          <span>Anonymous</span>
          <time datetime="2010-08-07 11:11:03-0400" pubdate>08-07-2010</time>
          <p>I literally don't know what this article means but I really like the design of it, so there's that.</p>
        </li>
      </ul>
    </section>
    
    <section>
      <h2>Post a comment</h2>
      <form>
        <div>
          <label for="fname">
            <span>Your Name</span>
            <input type="text" id="fname">
          </label>
        </div>
        
        <div>
          <label for="message">
            <span>Your Message</span>
            <textarea id="message"></textarea>
          </label>
        </div>
        
        <div>
          <input type="submit" value="Post Comment" />
        </div>     
      </form>
    </section>
  </footer>
</article>
            
          
!
            
              body {
  background-color: #EBC8B2;
    text-align: center;
}

h1 {
  color: Black;
  text-align: center;
  font-family: Courier;
  font-size: 40px;
  text-shadow: 2px 2px 5px white;
}

p {
  font-family: Courier;
  font-size: 20px;
  text-align: center;
  margin-left: 25%;
  margin-right: 25%;
  width: 50%

}
 
img {
  
  border: 10px solid black;  
  border-radius: 20%
   
 display: block;
 margin-left: 38%;
 margin-right: 38%;
 width: 20%;
 padding: .5%

}


img:hover {
  opacity: 0.5;
  filter: alpha(opacity=50); /* For IE8 and earlier */
}

figcaption{
  text-align: center;
  font-family: Courier;
  font-weight: bold;
  font-style: italic;
}
    
h2{
   text-align: center;
   font-family: Courier;

}
  
ul{
   font-family: Courier;
   text-align: center;
  list-style: none;
}

div {
  
  width: 300px;
  padding: 10px;
  border: 1px solid black;
}

/* unvisited link */
a:link {
  color: black;
}

/* visited link */
a:visited {
  color: grey;
}

/* mouse over link */
a:hover {
  color: white;
}

/* selected link */
a:active {
  color: black;
}

div {
  text-align: center;
  font-family: Courier;
  font-weight: bold;
  width: 300px;
  height: 40px;
  background-color: #EBC8B2;
  -webkit-animation-name: example; /* Safari 4.0 - 8.0 */
  -webkit-animation-duration: 8s; /* Safari 4.0 - 8.0 */
  animation-name: example;
  animation-duration: 8s;
}

/* Safari 4.0 - 8.0 */
@-webkit-keyframes example {
  from {background-color: black;}
  to {background-color: grey;}
}

/* Standard syntax */
@keyframes example {
  from {background-color: black;} 
  to {background-color: white;}
}


            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console