Pen Settings



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


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


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.


                <p>This form uses only the default browser validation, based on the use of input types, required attribute and pattern attribute. Experiment with:</p>
  <li>submitting before completing all inputs</li>
  <li>invalid formats</li>
  <li>the colour of the background and text (see CSS)</li>
  <li>different browsers</li>
  <li>using the keyboard only to fix and submit the form.</li>
<p>All fields are required unless marked optional.</p>
    <label for="name">Your name (optional):</label>
    <input id="name" type="text" autocomplete="name">
    <label for="email">Email:</label>
    <input id="email" type="email" autocomplete="email" required>
    <label for="numbers">Post Code:<br>
      <span>within Australia</span>
    <input type="text" id="numbers" required pattern="[0-9]{4}">
      <legend>Cats or dogs?</legend>
      <label for="animals-c">Cats</label>
      <input type="radio" id="animals-c" name="animals" required><br>
      <label for="animals-d">Dogs</label>
      <input type="radio" id="animals-d" name="animals" required><br>
      <label for="animals-b">Both</label>
      <input type="radio" id="animals-b" name="animals" required><br>
      <label for="animals-n">Neither</label>
      <input type="radio" id="animals-n" name="animals" required>
    <label for="selecto">Choose one:</label>
    <select id="selecto" required>
    <label for="checko">A useless checkbox:</label>
    <input id="checko" type="checkbox" required>
    <button type="submit">Submit</button>


                body {
  font-family: sans-serif;
form {
  /* background: navy;
  color: white;*/
  background: #efefef;
  color: black;
  padding: 0.25em 0;
div {
  margin: 1em;
label {
  display: inline-block;
  min-width: 10em;
label span {
  font-size: 0.8em;
input, select {
  vertical-align: top;
  padding: 0.25em;
button {
  padding: 0.5em 1em;