Pen Settings



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


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


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.


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.


                <h1>HTML5 datalist on other input types</h1>

<form id="autoform">

  <label for="date">choose a date:</label>
  <input type="date" list="datedata" id="date" name="date" min="0" max="20" required />
  <label for="experience">years experience:</label>
  <input type="range" list="experiencedata" id="experience" name="experience" min="0" max="20" required />
  <label for="color">favorite color:</label>
  <input type="color" list="colorlist" id="color" name="color" required />

  <button type="submit">submit</button>


<datalist id="datedata">

<datalist id="experiencedata">

<!-- must be full 6-digit hex value -->
<datalist id="colorlist">



                body {
  font-family: sans-serif;
  font-size: 100%;
  color: #222;
  background-color: #fafafe;
  margin: 1em;

label, button {
  display: block;
  margin-top: 1em;


                (() => {

  // stop form submission and output field names/values to console
  const form = document.getElementById('autoform');

  form.addEventListener('submit', e => {
    console.log('Submit disabled. Data:');

    const data = new FormData(form);
    for (let nv of data.entries()) {
      console.log(`  ${ nv[0] }: ${ nv[1] }`);