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

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 class="middle-path">
  <header>
    <h2>Accessible form</h2>
  </header>
  <section>
    <div>
      <form action="" method="">
        <fieldset>
          <legend>Example form</legend>

          <label data-error="[errormsg]" data-instructions="[instructions]">
            <input type="text" placeholder="Placeholder">
          </label>

          <label>
            <input type="text" value="Disabled" disabled>
          </label>

          <label>
            <span>Email input</span>
            <input type="email">
          </label>

          <label>Password input
            <input type="password" value="password">
          </label>

          <label for="textarea">Textarea</label>
          <textarea id="textarea" cols="30" rows="5">Textarea text</textarea>

          <label>Select field
            <select>
              <option selected disabled>Select an option</option>
              <option>Option 01</option>
              <option>Option 02</option>
            </select>
          </label>

          <label>File input
            <input type="file">
          </label>

          <label>
            <input type="radio" name="rad"> Radio input
          </label>

          <label>
            <input type="checkbox"> Checkbox input
          </label>

          <label>Number input
            <input type="number" value="5" min="0" max="10">
          </label>

          <label>Date input
            <input type="date">
          </label>

          <label>Time input
            <input type="time">
          </label>

          <button type="submit">Button</button>
        </fieldset>
      </form>
    </div>
    <div>
      <pre><code class="language-markup">&lt;form action=&quot;&quot; method=&quot;&quot;&gt;
  &lt;label data-error=&quot;[errormsg]&quot;
         for=&quot;[name]&quot;&gt;
    [label]
  &lt;/label&gt;
  &lt;input data-instructions=&quot;[instructions]&quot;
         name=&quot;[name]&quot;
         tabindex=&quot;[i]&quot;
         type=&quot;[type]&quot;&gt;
&lt;/form&gt;</code></pre>
    </div>
  </section>
  <aside>
  </aside>
</article>
              
            
!

CSS

              
                label {
  display: block;
  margin-bottom: 0.8rem;
  
  > span {
    display: inline-block;
    font-size: 0.8rem;
    white-space: wrap;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console