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

              
                <h1> html interactive controls - disabled</h1>

<form action="">

  <table id="results" border=1>
    <tbody>
      <tr>
        <th>Element</th>
        <th>label dimmed</th>
        <th>disabled control dimmed</th>
        <th>label child of control?</th>
        <th>focusable</th>
      </tr>
      <tr>

        <td><button disabled>button element</button> </td>
        <td><p>Yes in Chrome</p>
          <p>label text contrast Chrome</p>
          <p>Foreground: #A8A8BE<br>
            Background: #EAEAE9<br>
            Contrast ratio: 1.9:1</p>
          <p>No in Firefox        </p>
          <p>label text contrast Firefox</p>
        <p>Foreground: #6D6D6D<br>
          Background: #F0F0F1<br>
        Contrast ratio: 4.5:1</p></td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
        <td>no</td>

      </tr>
      <tr>

        <td><input type="button" value="input button" disabled></td>
        <td><p>Yes in Chrome</p>
          <p>No in Firefox </p>
       </td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
        <td>no</td>

      </tr>

      <tr>

        <td><input type="checkbox" value="" id="ch" disabled>

          <label for="ch">type="checkbox"</label>
        </td>
        <td>no</td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
        <td>&nbsp;</td>
        <td>no</td>

      </tr>

      <tr>

        <td><label> file input <input type="file" disabled></label></td>
        <td>Yes in Chrome, no in Firefox </td>
        <td>partially (button dimmed)</td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
        <td>no</td>

      </tr>

      <tr>

        <td>input type='image' <input name="" width="100" height="100" type="image" src="https://assets.codepen.io/128034/pig.jpg" alt="input type='image'" disabled></td>
        <td>no</td>
        <td>no</td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
        <td>no</td>

      </tr>

      <tr>
        <td><input type="submit" value="submit" disabled></td>
        <td>Yes in Chrome, no in Firefox</td>
        <td>yes</td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
        <td>no</td>
      </tr>
      <tr>

        <td>
          <p><label for="text0">type="text" </label>

            <input type="text" id="text0" disabled>
          </p>

          <p>&nbsp;</p>
        </td>
        <td>no</td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
        <td>no</td>
        <td>no</td>

      </tr>

      <tr>

        <td><label for="text1">type="text" with placeholder</label>

          <input type="text" id="text1" placeholder="some text" disabled>
        </td>
        <td><p>no <br>
          </p>
          <p>no - Placeholder contrast Chrome:</p>
          <p>Foreground: #757575<br>
            Background: #F6F6F5<br>
          Contrast ratio: 4.3:1</p>
          <p>yes - Placeholder contrast Firefox:</p>
          <p>Foreground: #AEAEAE<br>
            Background: #FBFBFA<br>
            Contrast ratio: 2.1:1<br>
        </p></td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
        <td>no</td>
        <td>no</td>
      </tr>

      <tr>
        <td> <label for="form-2">type="text" with Datalist</label>

          <input id="form-2" list="mylist" type="text" disabled>

          <datalist id="mylist">

            <option label="Miss" value="Miss">

            </option>
            <option label="Mr" value="Mr">

            </option>
            <option label="Ms" value="Ms">

            </option>
            <option label="Prof" value="Mad Professor">

            </option>
          </datalist>
        </td>
        <td>no</td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
        <td>no</td>
        <td>no</td>
      </tr>

      <tr>

        <td><label for="pass">type="password"</label>

          <input type="password" id="pass" disabled>
        </td>
        <td>no</td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
        <td>no</td>
        <td>no</td>
      </tr>

      <tr>

        <td><input type="radio" id="radio" value="" disabled>

          <label for="radio" >type="radio"</label>
        </td>
        <td>no</td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
        <td>no</td>
        <td>no</td>
      </tr>

      <tr>

        <td><input type="reset" disabled></td>
        <td><p>Yes in Chrome</p>
          <p>No in Firefox </p>
          <p>&nbsp;</p></td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
      </tr>

      <tr>

        <td><label>textarea element

            <textarea name="textarea" cols="10" rows="2" placeholder="some text" disabled></textarea></label></td>
        <td><p>no <br>
        </p>
          <p>no - Placeholder contrast Chrome:</p>
          <p>Foreground: #757575<br>
            Background: #F6F6F5<br>
            Contrast ratio: 4.3:1</p>
          <p>yes - Placeholder contrast Firefox:</p>
          <p>Foreground: #AEAEAE<br>
            Background: #FBFBFA<br>
        Contrast ratio: 2.1:1</p></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>

      </tr>

      <tr>

        <td><label for="search">type="search"</label>

          <input type="search" id="search" disabled>
        </td>
        <td>no</td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
        <td>no</td>
        <td>no</td>
      </tr>

      <tr>

        <td><label for="mail">type="email"</label>

          <input type="email" id="mail" disabled>
        </td>
        <td>no</td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
        <td>no</td>
        <td>no</td>
      </tr>

      <tr>

        <td><label for="t">type="tel"</label>

          <input type="tel" id="t" disabled>
        </td>
        <td>no</td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
        <td>no</td>
        <td>no</td>
      </tr>

      <tr>

        <td><label for="url">type="URL"</label>

          <input type="url" name="location" id="url" list="urls" disabled>

          <datalist id="urls">

            <option label="MIME: Format of Internet Message Bodies" value="http://tools.ietf.org/html/rfc2045">

            </option>
            <option label="HTML 4.01 Specification" value="http://www.w3.org/TR/html4/">

            </option>
            <option label="Form Controls" value="http://www.w3.org/TR/xforms/slice8.html#ui-commonelems-hint">

            </option>
            <option label="Scalable Vector Graphics (SVG) 1.1 Specification" value="http://www.w3.org/TR/SVG/">

            </option>
            <option label="Feature Sets - SVG 1.1 - 20030114" value="http://www.w3.org/TR/SVG/feature.html">

            </option>
            <option label="The Single UNIX Specification, Version 3" value="http://www.unix-systems.org/version3/">

            </option>
          </datalist>
        </td>
        <td>no</td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
        <td>no</td>
        <td>no</td>
      </tr>

      <tr>

        <td><label for="num">type="number"</label>

          <input type="number" id="num" step="2" disabled>

        </td>
        <td>no</td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
        <td>no</td>
        <td>no</td>
      </tr>

      <tr>

        <td><label for="d">type="date"</label>

          <input type="date" id="d" disabled>

         
        </td>
        <td>no</td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
        <td>no</td>
        <td>no</td>
      </tr>

      <tr>

        <td><label for="mo">type="month"</label>

          <input type="month" id="mo" disabled>

        </td>
        <td>no</td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
        <td>no</td>
        <td>no</td>
      </tr>

      <tr>

        <td><label for="wk">type="week"</label>

          <input type="week" id="wk" disabled>
        </td>
        <td>no</td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
        <td>no</td>
        <td>no</td>
      </tr>

      <tr>

        <td><label for="dtl">type="datetime-local"</label>

          <input type="datetime-local" id="dtl" disabled>

        </td>
        <td>no</td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
        <td>no</td>
        <td>no</td>
      </tr>

      <tr>

        <td><label for="ti">type="time"</label>

          <input type="time" id="ti" disabled>
        </td>
        <td>no</td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
        <td>no</td>
        <td>no</td>
      </tr>

      <tr>

        <td><label for="slid">type="range"</label>

          <input type="range" id="slid" value="10" min="1" max="11" disabled>
        </td>
        <td>no</td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
        <td>no</td>
        <td>no</td>
      </tr>

      <tr>

        <td><label for="col">type="color"</label>

          <input type="color" id="col" disabled>

        </td>
        <td>no</td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
        <td>no</td>
        <td>no</td>
      </tr>

      <tr>
        <td><label>select element <select name="" disabled>
              <option value="http://tools.ietf.org/html/rfc2045">

              </option>
              <option value="http://www.w3.org/TR/html4/">HTML 4.01 Specification

              </option>
              <option value="http://www.w3.org/TR/xforms/slice8.html#ui-commonelems-hint">Form Controls

              </option>
              <option value="http://www.w3.org/TR/SVG/">Scalable Vector Graphics (SVG) 1.1 Specification

              </option>
              <option value="http://www.w3.org/TR/SVG/feature.html">Feature Sets - SVG 1.1 - 20030114

              </option>
              <option value="http://www.unix-systems.org/version3/">The Single UNIX Specification, Version 3

              </option>
            </select></label></td>
        <td>no</td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
        <td>no</td>
        <td>no</td>
      </tr>

      <tr>
        <td>
          <fieldset disabled>

            <legend>legend</legend>

            <label for="tex"> label

              <input name="input" type="text" id="tex">

            </label>

          </fieldset>
        </td>
        <td>no</td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
        <td>no</td>
        <td>no</td>
      </tr>

      <tr>

        <td><label for="textfield">label using for/id</label>

          <input type="text" name="textfield" id="textfield" disabled>
        </td>
        <td>no</td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
        <td>no</td>
        <td>no</td>
      </tr>

      <tr>

        <td><label>label wrapped

            <input type="text" disabled>

          </label></td>
        <td>no</td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
        <td>no</td>
        <td>no</td>
      </tr>

      <tr>

        <td>no label

          <input type="text" disabled>
        </td>
        <td>no</td>
        <td><img src="https://assets.codepen.io/128034/tick.png" alt="yes" /></td>
        <td>no</td>
        <td>no</td>
      </tr>


    </tbody>
  </table>
</form>
              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console