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

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

              
                <article>
  <header>
    <button type="button"><p>Opinion</p></button>
    <h1><span>Thought That Life Was</span><span>Dull Already? It’s about to</span><span>Get Worse</span></h1>
    <img src="http://placehold.it/300x300"><img src="http://placehold.it/300x300"><img src="http://placehold.it/300x300"><img src="http://placehold.it/300x300">
  </header>
  <aside>
    <p>By <a href="#" rel="author">Benjy Stanton</a></p>
    <p class="lede">A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my dog</p>
  </aside>
  <main>
    <img src="http://placehold.it/100x100">
    <p>A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart. I am alone, and feel the charm of existence in this spot, which was created for the bliss of souls like mine. I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents.</p>
    <p>I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p>
    <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream; and, as I lie close to the earth, a thousand unknown plants are noticed by me: when I hear the buzz of the little world among the stalks, and grow familiar with the countless indescribable forms of the insects and flies, then I feel the presence of the Almighty, who formed us in his own image, and the breath of that universal love which bears and sustains us, as it floats around us in an eternity of bliss; and then, my friend, when darkness overspreads my eyes, and heaven and earth seem to dwell in my soul and absorb its power, like the form of a beloved mistress, then I often think with longing, Oh, would I could describe these conceptions, could impress upon paper all that is living so full and warm within me, that it might be the mirror of my soul, as my soul is the mirror of the infinite God!</p>
    <blockquote>A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart.</blockquote>
    <p>O my friend - but it is too much for my strength - I sink under the weight of the splendour of these visions! A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart. I am alone, and feel the charm of existence in this spot, which was created for the bliss of souls like mine.</p>
    <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now. When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream; and, as I lie close to the earth, a thousand unknown plants are noticed by me: when I hear the</p>
    <p> Fore more, head to <a href="#">benjystanton.co.uk</a></p>
  </main>
</article>
              
            
!

CSS

              
                *, *:before, *:after {
  box-sizing: border-box;
}

header {
  max-width:40em;
}

article {
  margin:5% 5%;
  padding:0 1%;
  border-left: 2px solid black;
  border-right: 1px solid black;
}

/* Images */

header img {
	width:50%;
}

main img {
  width:100%;
}

@media (min-width: 40em) { 
  main img {
    float:left;
    padding-right: 1em;
    width:auto;
  }
}

/* Typography */

header button {
  color:white;
  background:DodgerBlue;
  text-decoration:none;
  padding:0 1em;
  display:inline-block;
  text-transform:uppercase;
  border:none;
}

header button p {
  border-bottom:4px solid deeppink;
}

header button:hover p {
  border-color:white;
}

h1 {
	color:white;
  background:deeppink;
  text-transform:uppercase;
}

@media (min-width: 40em) { h1 {background:none;} }

h1 span {
  margin-bottom:.1em;
  padding:.1em;
}

@media (min-width: 40em) { h1 span { display:inline-block; background:deeppink;} }

main {
  column-count:2;
  column-gap:2em;
}

main p {
  margin:0;
  text-indent:1em;
}

blockquote {
  background: gold;
  margin:0;
  padding:1em;
  width:50%;
  float:left;
}
              
            
!

JS

              
                
              
            
!
999px

Console