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.


<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>

<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Reprehenderit eius explicabo maiores, ex, voluptatum quibusdam aspernatur possimus praesentium magni illum fugit, error nam? Ducimus minima laborum, architecto facere excepturi minus! Lorem ipsum dolor sit amet, consectetur adipisicing elit. Facilis iure nesciunt repudiandae, veniam dolorem. Porro maiores sapiente sunt dolor, magni, officiis saepe adipisci nostrum enim beatae maxime minus, magnam! Eius!</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore aperiam voluptates sequi repellat esse nam magni amet voluptate libero? Illum, quaerat suscipit magnam fuga quisquam non dignissimos rerum sunt qui.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ea veniam asperiores labore ratione nostrum autem maiores aliquam similique quos ex adipisci nihil optio voluptates, fugiat, in illo! Provident, vitae, voluptate!</p>

  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis molestias repellendus vel nam aperiam veritatis quia repellat asperiores voluptate commodi. Consequuntur ratione et modi id, magnam reiciendis illum maxime minus.</p>

<header><h1>Definition list</h1></header>
  <dt>Definition List Title</dt>
  <dd>Definition List Description</dd>
<header><h1>Ordered List</h1></header>
  <li>List Item 1</li>
  <li>List Item 2</li>
  <li>List Item 3</li>
<header><h1>Unordered List</h1></header>
  <li>List Item 1</li>
  <li>List Item 2</li>
  <li>List Item 3</li>

<header><h1>Horizontal Rules</h1></header>

<header><h1>Tabular Data</h1></header>
  <caption>Table Caption</caption>
      <th>Heading 1</th>
      <th>Heading 2</th>
      <th>Heading 3</th>
      <th>Heading 4</th>
      <th>Footer 1</th>
      <th>Footer 2</th>
      <th>Footer 3</th>
      <th>Footer 4</th>
      <td>Cell 1-1</td>
      <td>Cell 1-2</td>
      <td>Cell 1-3</td>
      <td>Cell 1-4</td>
      <td>Cell 2-1</td>
      <td>Cell 2-2</td>
      <td>Cell 2-3</td>
      <td>Cell 2-4</td>
      <td>Cell 3-1</td>
      <td>Cell 3-2</td>
      <td>Cell 3-3</td>
      <td>Cell 3-4</td>

<p><strong>Keyboard input:</strong> <kbd>Cmd</kbd></p>
<p><strong>Inline code:</strong> <code>&lt;div&gt;code&lt;/div&gt;</code></p>
<p><strong>Sample output:</strong> <samp>This is sample output from a computer program.</samp></p>

<header><h1>Pre-formatted text</h1></header>
<pre>P R E F O R M A T T E D T E X T
  ! " # $ % &amp; ' ( ) * + , - . /
  0 1 2 3 4 5 6 7 8 9 : ; &lt; = &gt; ?
  @ A B C D E F G H I J K L M N O
  P Q R S T U V W X Y Z [ \ ] ^ _
  ` a b c d e f g h i j k l m n o
  p q r s t u v w x y z { | } ~ </pre>

<header><h1>Inline elements</h1></header>
<p><a href="#!">This is a text link</a>.</p>
<p><strong>Strong is used to indicate strong importance.</strong></p>
<p><em>This text has added emphasis.</em></p>
<p>The <b>b element</b> is stylistically different text from normal text, without any special importance.</p>
<p>The <i>i element</i> is text that is offset from the normal text.</p>
<p>The <u>u element</u> is text with an unarticulated, though explicitly rendered, non-textual annotation.</p>
<p><del>This text is deleted</del> and <ins>This text is inserted</ins>.</p>
<p><s>This text has a strikethrough</s>.</p>
<p>Subscript for things like H<sub>2</sub>O.</p>
<p><small>This small text is small for for fine print, etc.</small></p>
<p>Abbreviation: <abbr title="HyperText Markup Language">HTML</abbr></p>
<p><q cite="">This text is a short inline quotation.</q></p>
<p><cite>This is a citation.</cite></p>
<p>The <dfn>dfn element</dfn> indicates a definition.</p>
<p>The <mark>mark element</mark> indicates a highlight.</p>
<p>The <var>variable element</var>, such as <var>x</var> = <var>y</var>.</p>
<p>The time element: <time datetime="2013-04-06T12:32+00:00">2 weeks ago</time></p>

  <figcaption>Figure Caption</figcaption>

<div><audio controls="">audio</audio></div>

<div><video controls="">video</video></div>

<div><meter value="5" min="0" max="10">5 out of 10</meter></div>

<div><progress value="50" max="100">50%</progress></div>

<div><iframe src="about:blank" height="5"></iframe></div>

<header><h1>Form elements</h1></header>

    <legend>Input fields</legend>
      <label for="input__text">Text Input</label>
      <input id="input__text" type="text" placeholder="Text Input">
      <label for="input__password">Password</label>
      <input id="input__password" type="password" placeholder="Type your Password">
      <label for="input__webaddress">Web Address</label>
      <input id="input__webaddress" type="url" placeholder="">
      <label for="input__emailaddress">Email Address</label>
      <input id="input__emailaddress" type="email" placeholder="">
      <label for="input__phone">Phone Number</label>
      <input id="input__phone" type="tel" placeholder="(999) 999-9999">
      <label for="input__search">Search</label>
      <input id="input__search" type="search" placeholder="Enter Search Term">
      <label for="input__text2">Number Input</label>
      <input id="input__text2" type="number" placeholder="Enter a Number">
      <label for="input__text3">Error</label>
      <input id="input__text3" type="text" placeholder="Text Input">
      <label for="input__text4">Valid</label>
      <input id="input__text4" type="text" placeholder="Text Input">
    <legend>Select menus</legend>
      <label for="select">Select</label>
      <select id="select">
        <optgroup label="Option Group">
          <option>Option One</option>
          <option>Option Two</option>
          <option>Option Three</option>
      <label for="select__multiple">Multiple</label>
      <select id="select__multiple" multiple="multiple" size="4">
        <optgroup label="Option Group">
          <option>Option One</option>
          <option>Option Two</option>
          <option>Option Three</option>
      <label for="checkbox1"><input id="checkbox1" type="checkbox" checked="checked"> Choice 1</label>
      <label for="checkbox2"><input id="checkbox2" type="checkbox"> Choice 2</label>
      <label for="checkbox3"><input id="checkbox3" type="checkbox"> Choice 3</label>
      <li><label for="checkbox4"><input id="checkbox4" type="checkbox" checked="checked"> Choice 1</label></li>
      <li><label for="checkbox5"><input id="checkbox5" type="checkbox"> Choice 2</label></li>
      <li><label for="checkbox6"><input id="checkbox6" type="checkbox"> Choice 3</label></li>
    <legend>Radio buttons</legend>
      <label for="radio1"><input id="radio1" name="radio__a" type="radio" checked="checked"> Option 1</label>
      <label for="radio2"><input id="radio2" name="radio__a" type="radio"> Option 2</label>
      <label for="radio3"><input id="radio3" name="radio__a" type="radio"> Option 3</label>
      <li><label for="radio4"><input id="radio4" name="radio__b" type="radio" checked="checked"> Option 1</label></li>
      <li><label for="radio5"><input id="radio5" name="radio__b" type="radio"> Option 2</label></li>
      <li><label for="radio6"><input id="radio6" name="radio__b" type="radio"> Option 3</label></li>
      <label for="textarea">Textarea</label>
      <textarea id="textarea" rows="5" placeholder="Enter your message here"></textarea>
    <legend>HTML5 inputs</legend>
      <label for="ic">Color Input</label>
      <input type="color" id="ic" value="#000000">
      <label for="in">Number Input</label>
      <input type="number" id="in" min="0" max="10" value="5">
      <label for="ir">Range Input</label>
      <input type="range" id="ir" value="10">
      <label for="idd">Date Input</label>
      <input type="date" id="idd" value="1970-01-01">
      <label for="idm">Month Input</label>
      <input type="month" id="idm" value="1970-01">
      <label for="idw">Week Input</label>
      <input type="week" id="idw" value="1970-W01">
      <label for="idt">Datetime Input</label>
      <input type="datetime" id="idt" value="1970-01-01T00:00:00Z">
      <label for="idtl">Datetime-local Input</label>
      <input type="datetime-local" id="idtl" value="1970-01-01T00:00">
    <legend>Action buttons</legend>
      <input type="submit" value="Input">
      <button type="submit">Button</button>
      <input type="reset" value="Reset">
      <input type="submit" value="Disabled" disabled>

<header><h1>Modular Type Scale</h1></header>
  <p class="vr-font-size-5">font-size: 5</p>
  <p class="vr-font-size-4">font-size: 4</p>
  <p class="vr-font-size-3">font-size: 3</p>
  <p class="vr-font-size-2">font-size: 2</p>
  <p class="vr-font-size-1">font-size: 1</p>
  <p class="vr-font-size-0">font-size: 0</p>

<header><h1>Line Height</h1></header>
  <p class="vr-line-height-5">line-height: 5</p>
  <p class="vr-line-height-4">line-height: 4</p>
  <p class="vr-line-height-3">line-height: 3</p>
  <p class="vr-line-height-2">line-height: 2</p>
  <p class="vr-line-height-1">line-height: 1</p>

<header><h1>Height: Fixed Unit (px)</h1></header>
  <img class="test-height-100" src="" alt="image">
  <img class="test-height-150" src="" alt="image">
  <img class="test-height-200" src="" alt="image">

<header><h1>Height: Vertical Rhythm</h1></header>
<div style="overflow: auto;">
  <div class="vr-height-1"  style="float: left; width: 2em; margin-right: 1em; text-align: center;">1</div>
  <div class="vr-height-2"  style="float: left; width: 2em; margin-right: 1em; text-align: center;">2</div>
  <div class="vr-height-3"  style="float: left; width: 2em; margin-right: 1em; text-align: center;">3</div>
  <div class="vr-height-4"  style="float: left; width: 2em; margin-right: 1em; text-align: center;">4</div>
  <div class="vr-height-5"  style="float: left; width: 2em; margin-right: 1em; text-align: center;">5</div>
  <div class="vr-height-6"  style="float: left; width: 2em; margin-right: 1em; text-align: center;">6</div>
  <div class="vr-height-7"  style="float: left; width: 2em; margin-right: 1em; text-align: center;">7</div>
  <div class="vr-height-8"  style="float: left; width: 2em; margin-right: 1em; text-align: center;">8</div>
  <div class="vr-height-9"  style="float: left; width: 2em; margin-right: 1em; text-align: center;">9</div>
  <div class="vr-height-10" style="float: left; width: 2em; margin-right: 1em; text-align: center;">10</div>

<div class="vr-width-1"  style="text-align: center;">1</div>
<div class="vr-width-2"  style="text-align: center;">2</div>
<div class="vr-width-3"  style="text-align: center;">3</div>
<div class="vr-width-4"  style="text-align: center;">4</div>
<div class="vr-width-5"  style="text-align: center;">5</div>
<div class="vr-width-6"  style="text-align: center;">6</div>
<div class="vr-width-7"  style="text-align: center;">7</div>
<div class="vr-width-8"  style="text-align: center;">8</div>
<div class="vr-width-9"  style="text-align: center;">9</div>
<div class="vr-width-10" style="text-align: center;">10</div>

<div class="vr-margin-top-1"><code>margin-top: 1</code></div>
<div class="vr-margin-top-2"><code>margin-top: 2</code></div>
<div class="vr-margin-top-3"><code>margin-top: 3</code></div>
<div class="vr-margin-top-4"><code>margin-top: 4</code></div>
<div class="vr-margin-top-5"><code>margin-top: 5</code></div>
<div class="vr-margin-bottom-1"><code>margin-bottom: 1</code></div>
<div class="vr-margin-bottom-2"><code>margin-bottom: 2</code></div>
<div class="vr-margin-bottom-3"><code>margin-bottom: 3</code></div>
<div class="vr-margin-bottom-4"><code>margin-bottom: 4</code></div>
<div class="vr-margin-bottom-5"><code>margin-bottom: 5</code></div>

<p class="vr-padding-top-1"><code>padding-top: 1</code></p>
<p class="vr-padding-top-2"><code>padding-top: 2</code></p>
<p class="vr-padding-top-3"><code>padding-top: 3</code></p>
<p class="vr-padding-top-4"><code>padding-top: 4</code></p>
<p class="vr-padding-top-5"><code>padding-top: 5</code></p>
<p class="vr-padding-bottom-1"><code>padding-bottom: 1</code></p>
<p class="vr-padding-bottom-2"><code>padding-bottom: 2</code></p>
<p class="vr-padding-bottom-3"><code>padding-bottom: 3</code></p>
<p class="vr-padding-bottom-4"><code>padding-bottom: 4</code></p>
<p class="vr-padding-bottom-5"><code>padding-bottom: 5</code></p>

<header><h1>Border Offsets</h1></header>
<p class="test-offset">
  <code>offset: 3px</code>
<p class="test-offset-top">
  <code>offset-top: 3px</code>
<p class="test-offset-bottom">
  <code>offset-bottom: 3px</code>



                // Vertical Rhythm Reset Demo
// =====================================

// 1. Import Vertical Rhythm Reset
// -------------------------------------
// NOTE: On CodePen, this is done
// via the "Settings" dialog, so the
// import line below is for demo only.
// @import "path/to/vertical-rhythm-reset"

// 2. Set base variables
// -------------------------------------
// These are the default values used
// for the smallest breakpoint or for
// all breakpoints if $vr-breakpoints
// is false (see #3)
$vr-font-size    : 14px;
$vr-line-height  : 1.5;
$vr-modular-scale: minor-third;
$vr-grid-color   : rgb(233, 30, 99);

// 3. Set breakpoints (optional)
// -------------------------------------
// Breakpoint values omitted use
// default values (see #2). To
// disable responsive features, 
// set this value to false.
$vr-breakpoints: (
    60em: ( // 960px
        font-size    : 16px,
        grid-color   : blue
    80em: ( // 1280px
        font-size    : 18px,
        line-height  : 1.8,
        modular-scale: major-third,
        grid-color   : purple

// 4. Call the reset mixin at root
// -------------------------------------
// This will generate the CSS reset
// and normalization rules based on
// the settings above.
@include vr-reset();

// Demo: grid overlay (optional)
// -------------------------------------
body {
  @include vr-grid(
    $lines    : true,
    $highlight: true,
    $detail   : false

// Demo: Using the vr() mixin
// -------------------------------------
// This ensures values are multiples of
// the vertical rhythm grid height.
h1 {
  @include vr(
    $font-size     : 4,
    $margin-top    : 1,
    $margin-bottom : 1,
    $padding-top   : 0,
    $padding-bottom: 0

// Demo: Fixed Height Elements
// -------------------------------------
.test-height-100 {
    @include vr($height: 100px);
.test-height-150 {
    @include vr($height: 150px);
.test-height-200 {
    @include vr($height: 200px);

// Demo: Border Offsets
// -------------------------------------
.test-offset {
  // A single offset value is applied
  // the to both top and bottom.
  @include vr($offset: 3px);
  border: 3px solid #999;
.test-offset-top {
  @include vr($offset-top: 3px);
  border-top: 3px solid #999;
.test-offset-bottom {
  @include vr($offset-bottom: 3px);
  border-bottom: 3px solid #999;