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


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


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.


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.


    <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>

    <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>

      <img src="" alt="Portrait of Tammy Strobel" />
      <figcaption>Viktor Koen</figcaption>


    <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>

      <img src="" />
      <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>


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

    <h2>Comments <span>(3)</span></h2>
          <time datetime="2010-08-07 11:11:03-0400" pubdate>08-07-2010</time>
          <p>Cool Story.</p>
              <time datetime="2010-08-07 12:11:03-0400" pubdate>08-07-2010</time>
          <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>
      <h2>Post a comment</h2>
          <label for="fname">
            <span>Your Name</span>
            <input type="text" id="fname">
          <label for="message">
            <span>Your Message</span>
            <textarea id="message"></textarea>
          <input type="submit" value="Post Comment" />


                @import url('');

:root {
  --main-columns: 8;
  --grid-gap: 1rem;

article {
  font-family: 'Lora', serif;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-gap: var(--grid-gap);
  line-height: 1.6;
  padding: var(--grid-gap);

header {
  grid-column: 1 / 10;
  margin-bottom: var(--grid-gap);
  h1 {
    font-size: 3em;
    margin-top: 2em;
    margin-bottom: 0.25em;

abbr {
  border: 0;
  outline: 0;
  text-decoration: none;

main {
  display: grid;
  grid-gap: 0 var(--grid-gap);
  grid-column: 1 / span var(--main-columns);
  grid-template-columns: repeat(var(--main-columns), 1fr);
  p {
    grid-column: 2 / -2;
    margin-top: 1em;
    font-size: 1.1em;
    &:first-child {
      margin-top: 0;
      font-size: 1.5em;
  figure {
    grid-column: 1 / -1;
    img {
      display: block;
      max-width: 100%;
      width: auto;
    figcaption {
      font-size: 1.25em;
      font-style: italic;
      margin: 0.25em 0;

aside {
  grid-column: 9 / -1;
  grid-row: 2;

footer {
  align-self: flex-end;
  grid-column: 9 / span 4;
  grid-row: 2;


                const replacement = {
  'happy': '😁',
  'car': '🚗',
  'bike': '🚲',
  'appartment': '🏠',
  'e-mail': '📧',
  'plate': '🍽',
  'shoe': '👞',
  'money': '💰',
  'book': '📕', // Might throw mismatch
  'hiking': '🥾',
  'europe': '🇪🇺',
  'wedding': '👰🏻',
  'flower': '🌷',
replacement.happiness = replacement.happy;

const p = document.querySelectorAll('p');
const h1 = document.querySelectorAll('h1');

[...p, ...h1].forEach((p, index) => {
  let newHtml = p.innerHTML;
  Object.entries(replacement).forEach(([find, replace]) => {
    replace = `<abbr title='${find}'>${replace}</abbr>`;
    newHtml = newHtml.replace(new RegExp(find, 'gi'), replace);
  p.innerHTML = newHtml;