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 Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

              
                <form>
  Required text input: <input type="text" required><input type="submit" id="firstSubmitButton">
</form>
<br><br>
<form>
  Required checkbox input: <input type="checkbox" required><input type="submit">
</form>
<br><br>
<form>
  Required radio input: <input type="radio" name="myradiogroup1" required><br>
  Required radio input: <input type="radio" name="myradiogroup1">
  <input type="submit">
</form>
<br><br>
<form>
  Required file input: <input type="file" required><input type="submit">
</form>
<br><br>
<form>
  Required email input: <input type="email" value="invalid" required><input type="submit">
</form>
<br><br>
<form>
  Required url input: <input type="url" value="invalid" required><input type="submit">
</form>
<br><br>
<form>
Required select element: <select required>
  <option disabled selected value> -- select an option -- </option>
  <option value="volvo">Volvo</option>
</select>
<input type="submit">
</form>
<br><br>
<form>
  Required input with pattern (expects a letter): <input type="text" value="1" pattern="[a-z]" required><input type="submit">
</form>
<br><br>
<form>
  Required input with minlength=100: <input type="text" minlength=100 required><input type="submit">
</form>
<br><br>
<form>
  Required input with maxlength=1: <input type="text" maxlength=1 required><input type="submit">
</form>
<br><br>
<form>
  Required range with min=5: <input type="number" value="1" min=5 required><input type="submit">
</form>
<br><br>
<form>
  Required range with max=5: <input type="number" value="10" max=5 required><input type="submit">
</form>
<br><br>
<form>
  Required range with step=3 / min=0: <input type="number" value="10" min=0 step=3 required><input type="submit">
</form>
<br><br>
<form>
  Input with autofill: <input type="text" name="address" minlength=10 required>
  <input type="text" name="full-name"> <input type="submit">
</form>
<br><br>
<form>
Input with custom validity: <input type="text" id="customValidityInput">
  <input type="submit">
</form>
<br><br>
<input type="button" value="Submit top form" id ="lastSubmitButton">
              
            
!

CSS

              
                
              
            
!

JS

              
                document.getElementById("lastSubmitButton").onclick = function() {
  document.getElementById("firstSubmitButton").click();
}

document.getElementById("customValidityInput").setCustomValidity("Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of \"de Finibus Bonorum et Malorum\" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, \"Lorem ipsum dolor sit amet..\", comes from a line in section 1.10.32.\
The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from \"de Finibus Bonorum et Malorum\" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.");
              
            
!
999px

Console