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 is required to process package imports. If you need a different preprocessor remove all packages first.

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


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.


                <div class="container">
Ems and Rems
This h2 has no parent element and it's font-size is 2em.

<div class="momanddad">
   This h2 has a font-size of 2em and it is inside of a parent container called .momanddad, which has a font-size of .6em. It's actual size is 1.2em, because the two em values multiply.
    This is an h3, which has a font-size of 2rem<span class="red">*</span> and is inside of the .momanddad element too, but it ignored the em-based font-size on the div.

  <p><strong>Solution:</strong> How can you avoid all of these issues? Use rems or just don't put font-size on anything that isn't a text element.</p>

    <p><strong>*Note:</strong> Rems are *mostly* cross-browser friendly, but to make sure, include the pixel equilavent of font-size above the rem line one in case the browser can't read ems (see h3 css or read more <a href="" target="_blank">here</a>).</p>


                html {
  font-size: 100%;
   font-family: "brandon-grotesque",sans-serif;
  padding-bottom: 5em;

.container {
  width: 700px;
  margin: 0 auto;
h1 {
  text-align: center;
  font-size: 3em;

h2 {
  font-size: 2em;

.momanddad {
  font-size: .6em;
  outline: red 1px solid;
  padding: 1em 2%;

h3 {
  font-size: 48px; /* fall back in case browser can't read rems */
 font-size: 2rem;}

p strong,,a:link, a:visited {
  color: red;

p {
    font-size: 1.4em;