Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <header class="main-header">
  <h1 class="title">WordPress.org Typographic Modular Scale</h1>
</header>

<section class="break headings">
  <h1 class="title">Headings</h1>
  
  <h1>Heading Level 1</h1>
  <h2>Heading Level 2</h2>
  <h3>Heading Level 3</h3>
  <h4>Heading Level 4</h4>
  <h5>Heading Level 5</h5>
  <h6>Heading Level 6</h6>
</section>

<section class="break body">
  <h1 class="title">Body</h1>
  
  <p class="intro">(Intro) WordPress is web software you can use to create a beautiful website, blog, or app. We like to say that WordPress is both free and priceless at the same time.</p>
  
  <p>The core software is built by hundreds of community volunteers, and when you’re ready for more there are thousands of plugins and themes available to transform your site into almost anything you can imagine. Over 60 million people have chosen WordPress to power the place on the web they call “home” — we’d love you to join the family.</p>
  <p>Some more base text for our reading pleasure to test the spacing between paragraphs.</p>
  
  <p class="aside">(Aside) WordPress requires a server running PHP and MySQL or MariaDB. We  recommend version 5.6 or greater of both.</p>
  
  <p class="note">(Note) We also recommend either Apache or Nginx as the most robust options for running WordPress, but neither is required.</p>
</section>

<section class="break examples">
  <h1 class="title">Examples (Headings + Body)</h1>
  
  <h1>Heading Level 1</h1>
  <p>The core software is built by hundreds of community volunteers, and when you’re ready for more there are thousands of plugins and themes available to transform your site into almost anything you can imagine. Over 60 million people have chosen WordPress to power the place on the web they call “home” — we’d love you to join the family.</p>
  <h2>Heading Level 2</h2>
  <p>The core software is built by hundreds of community volunteers, and when you’re ready for more there are thousands of plugins and themes available to transform your site into almost anything you can imagine. Over 60 million people have chosen WordPress to power the place on the web they call “home” — we’d love you to join the family.</p>
  <h3>Heading Level 3</h3>
  <p>The core software is built by hundreds of community volunteers, and when you’re ready for more there are thousands of plugins and themes available to transform your site into almost anything you can imagine. Over 60 million people have chosen WordPress to power the place on the web they call “home” — we’d love you to join the family.</p>
  <h4>Heading Level 4</h4>
  <p>The core software is built by hundreds of community volunteers, and when you’re ready for more there are thousands of plugins and themes available to transform your site into almost anything you can imagine. Over 60 million people have chosen WordPress to power the place on the web they call “home” — we’d love you to join the family.</p>
  <h5>Heading Level 5</h5>
  <p>The core software is built by hundreds of community volunteers, and when you’re ready for more there are thousands of plugins and themes available to transform your site into almost anything you can imagine. Over 60 million people have chosen WordPress to power the place on the web they call “home” — we’d love you to join the family.</p>
  <h6>Heading Level 6</h6>
  <p>The core software is built by hundreds of community volunteers, and when you’re ready for more there are thousands of plugins and themes available to transform your site into almost anything you can imagine. Over 60 million people have chosen WordPress to power the place on the web they call “home” — we’d love you to join the family.</p>
</section>

<section class="break examples block-headings">
  <h1 class="title">Headings & subheadings</h1>
  
  <h1>Heading Level 1</h1>
  <p class="subheading">This is a subheading that provides further information.</p>
  
  <h2>Heading Level 2</h2>
  <p class="subheading">This is a subheading that provides further information with more text to double up the lines.</p>
</section>

<section class="break examples">
</section>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700,400italic,700italic|Noto+Serif:400,700,400italic,700italic);

// Modular Scale Variables
$ms-base: 1rem 1.167rem;
$ms-ratio: 1.25;
$ms-breakpoint: 737px;

$type__base: 21px;
$type__base-mobile: 16px;
$type__lineheight: 1.5;

// Colors
$color__wp-blue: #0073aa;
$color__base-gray: #32373c;
$color__green: #C7E8CA;

* { box-sizing:border-box; }
.clearfix:before, .clearfix:after { content: ""; display: table; }
.clearfix:after { clear: both; }

html, body {
  font-size: $type__base-mobile;
}
@media(min-width:$ms-breakpoint) {
  html, body {
    font-size: $type__base;
  }
}

body {
  font-family: 'Source Sans Pro', sans-serif;
  line-height: $type__lineheight;
  font-weight: 400;
  color: $color__base-gray;
  
  padding: 0;
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Noto Serif", serif;
}

// For design purposes of this page only
section.break {
  margin: ms(10) ms(4);
  padding: 0;
  border-top: 2px solid #eee;
  
  &.block-headings {
    text-align:center;
    
    .title { text-align:left; }
    p { margin-bottom:4rem; }
  }
}
header.main-header { 
  margin: ms(10) ms(4);
}
h1.title {
  font-size: ms(-2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
  color: $color__wp-blue;
}

h1, h2, h3, h4, h5, h6 {
  line-height: $type__lineheight;
  margin:2rem 0 1rem;
}

h1 {
  font-size: ms(12);
  font-weight: 300;
}

h2 {
  font-size: ms(8);
  font-weight: 300;
}

h3 {
  font-size: ms(4);
  font-weight: 700;
}

h4 {
  font-size: ms(2);
  font-weight: 600;
}

h5 {
  font-size: ms(0);
  text-transform: uppercase;
  letter-spacing: 0.01rem;
  font-weight: 600;
}

h6 {
  font-size: ms(-2);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
}

p { 
  margin:1em 0;
  max-width: ms(32);
  &.subheading {
    font-size: ms(2);
    font-weight:300;
    text-align:center;
    color:#82878C;
    margin: -1rem auto 2rem;
  }
  &.intro {
    font-size: ms(2);
  }
  &.aside {
    font-size: ms(-2);
  }
  &.note {
    font-size: ms(-4);
    letter-spacing: 0.01rem;
    max-width: ms(26);
  }
}

a { 
	color:$color__wp-blue; 
	text-decoration:none; 
	
	&:hover { text-decoration:underline; }
}

@media (min-width:630px) {
  aside p {
    font-size: ms(-2);
    letter-spacing: 0.005rem;
    max-width: ms(30);
  }
}



              
            
!

JS

              
                
              
            
!
999px

Console