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.

              <h1>The Fortean World Times</h1>
<article class="breaking">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/earth-vs-the-flying-saucers.jpg" alt="Photograph of a flying saucer over the US Capitol building">
    <h1>Washington D.C. Attacked By Flying Saucers</h1>
    <h2>Dateline Washington D.C.</h2>
    <h3>Frank Bragg reporting</h3>
    <p>The country was brought to a standstill today when flying saucers – presumably from Mars, although Venusians have also been suspected – appeared over the nation’s capital, intent on destruction. Curiously, they only attacked Pennsylvania Avenue, and have not appeared elsewhere in the country.
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/bigfoot_1.jpg" alt="Photograph of a Bigfoot">
<h1>Bigfoot Found, Shot, Killed</h1>
<h2>Dateline Washington State</h2> <h3>Jessica Walsh reporting</h3>
<p>The first conclusive proof of the elusive Sasquatch was found today, when one of the ape-men was found and killed by a hunter in the north-eastern corner of the state.
<p>The hunter plans to tour the pelt in the fall.
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/alligator-sewer_1.jpg" alt="Photograph of an alligator emerging from an open manhole cover">
<h1>Nest of Alligators Found in New York Sewers</h1>
<h2>Dateline New York City</h2>
<h3>Ted Sturgis reporting</h3>
<p>Years of rumours were confirmed yesterday when a nest of alligators were found in the sewers of New York City, just south of Times Square. The largest, which locals have dubbed “Mugsy”, measures over 21 feet long.
              @import url(https://fonts.googleapis.com/css?family=Oswald:400,300);
@import url(https://fonts.googleapis.com/css?family=Merriweather);
@font-face {
  font-family: 'Queens Park';
  src: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/queens-park.woff') format('woff');
  font-style: normal;
  font-weight: 400;
section { display: flex; }
body > h1 { 
  font-family: Queens Park, serif;
  font-size: 4rem;
  text-align: center; 
article { 
  margin: 1rem;
  -ms-flex: 1 0 0px;
  flex: 1; 
  /* shortcut for "flex-grow: 1". Note that it MUST be a unitless value to work; defined with a unit (e.g. flex: 1px) the shortcut would alter the flex-basis property. */
article.breaking { 
  -ms-flex-grow: 2; 
  flex: 2; 
  /* shortcut for "flex-grow: 2" */
article img { 
  width: 100%; height: auto; 
article h1, article h2, article h3 { font-family: Oswald, serif; }
article h1 { 
  font-size: 2rem; 
  line-height: 1.3;
article h2, article h3 { 
  font-size: 1.2rem; 
  text-align: right; 
  line-height: 1.3;
  margin: .3rem 0;
  font-weight: 300;
article h3 { 
  font-size: 1.1rem; 
article p { 
  font-family: Merriweather;
  line-height: 1.6; 
@media screen and (max-width: 750px) {
  body > h1 { font-size: 3rem; }
  section { 
    -ms-flex-direction: column;
    -webkit-box-orient: vertical;
    flex-direction: column; 

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