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

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

              
                <h1>HTML5 Form</h1>

<form class="form"> 
  
  <!--SEARCH-->
  <label for="search">Search</label>
  <input type="search" id="search" placeholder="search something" autofocus spellcheck="false">
  
  
  <h2>Content Aware Fields for Smartphones and Tablets</h2>
  
  <!--CONTENT AWARE KEYBOARD ON SMARTPHONES-->
  <label for="email">Email (Required) <span class="required">*</span></label>
  <input type="email" id="email" placeholder="enter your email" required>
  
  <label for="url">URL</label>
  <input type="url" id="url" placeholder="enter your website address">
  
  <label for="tel">Telephone</label>
  <input type="tel" id="tel" placeholder="enter your phone number">
  
  <!--DATALIST-->
  <label for="datalist">Datalist</label>
  <input type="text" id="datalist" list="colors" placeholder="Your favorite color">
  
  <datalist id="colors">
    <option>red</option>
    <option>green</option>
    <option>blue</option>
    <option>yellow</option>
    <option>orange</option>
  </datalist>
  
  <!--RANGE-->
  <label for="range">Range</label>
  <input type="range" id="range" max="100" min="0" value="50" step="10">
  
  <!--DATE-->
  <label for="date">Date</label>
  <input type="date" id="date">
  
  <!--COLOR PICKER-->
  <label for="color">Color Picker</label>
  <input type="color" id="color">
  
  <input type="submit" value="Submit" id="submit">
</form>
              
            
!

CSS

              
                *, *:before, *:after {
  -webkit-box-sizing: border-box; 
  -moz-box-sizing: border-box; 
  box-sizing: border-box;
}

body {
   font-family:sans-serif;
   text-align:center;
}

h2 {
  color:#333;
  font-size:16px;
  margin:2.5rem 0 0;
}

.form {
  max-width:480px;
  margin:0 auto;
  background:#eee;
  padding:15px;
  border-radius:10px;
  border:1px solid #CCC;
}

.form label {
  display:block;
  margin:35px 0 10px;
  background:#c6c6c6;
  color:#333;
  padding:5px 10px;
  border-radius:10px;
  font-size:16px;
}

.form label:first-child{
  margin:0 0 10px;
}

.form input {
  width:100%;
  padding:10px;
  border-radius:5px;
  border:0;
  border:1px solid #CCC;
  font-size:14px;
}

#color {
  height:50px;
}

#submit {
  background:blue;
  color:#FFF;
  margin:2rem 0 0;
}

.required {
  color:red;
}
              
            
!

JS

              
                


              
            
!
999px

Console