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

              
                <header>
  <h1>Register Your Cat</h1>
</header>
<main>
  <form>
    <div class="container">
      <div class="item">
        <label for="name">Cat's name<span aria-hidden="true"> *</span></label>
        <input type="text" id="name" name="name" aria-required="true" aria-invalid="true">
        <p id="error1" class="error"><span aria-hidden="true">⨂</span> Cat's name is required.</p>
        <label for="email">Your email<span aria-hidden="true"> *</span></label>
        <input type="email" id="email" name="email" autocomplete="email" aria-required="true" aria-invalid="true" aria-describedby="error2">
        <div id="message2">
          <p id="error2" class="error"><span aria-hidden="true">⨂</span> Email format <em>email@domain.com</em></p>
        </div>

        <label for="birthday">Cat's birthday</label>
        <input type="text" id="birthday" name="birthday" aria-describedby="help1" pattern="^\s*(1[012]|0?[1-9])\/(3[01]|[12][0-9]|0?[1-9])\/((?:19|20)\d{2})\s*$">
        <p id="help1" class="help">Birthday format <em>mm/dd/yyyy</em></p>
        <fieldset>
          <legend>Is your cat altered?</legend>
          <label for="yes"> <input name="altered" type="radio" id="yes">Yes</label>
          <label for="no"> <input name="altered" type="radio" id="no">No</label>
        </fieldset>
      </div>
      <div class="item">
        <label for="markings">Cat's markings<span aria-hidden="true"> *</span></label>
        <select aria-required="true" name="markings" id="markings">
          <option value=""> select an option </option>
          <option value="solid">Solid</option>
          <option value="bi">Bi-color</option>
          <option value="calico">Calico</option>
          <option value="tabby">Tabby</option>
          <option value="torbie">Torbie</option>
          <option value="tortoiseshell">Tortoiseshell</option>
          <option value="tuxedo">Tuxedo</option>
        </select>
        <div id="message3">
          <p id="error3" class="error"><span aria-hidden="true">⨂</span> Select cat's markings.</p>
        </div>

        <fieldset>
          <legend>Cat's colors</legend>
          <p><label for="black"> <input type="checkbox" id="black" name="black">Black</label></p>
          <p><label for="white"> <input type="checkbox" id="white" name="white">White</label></p>
          <p><label for="brown"> <input type="checkbox" id="brown" name="brown">Brown</label></p>
          <p><label for="orange"> <input type="checkbox" id="orange" name="orange">Orange</label></p>
          <p><label for="gray"> <input type="checkbox" id="gray" name="gray">Gray</label></p>
        </fieldset>

      </div>
    </div>
    <button type="submit">Send</button>
  </form>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Libre+Franklin:wght@400;900&display=swap');
body {
  background-color: #222;
  color: #fff;
  font-family: 'Libre Franklin', sans-serif;
}
header,
main {
  margin: 1em auto;
  max-width: 800px;
  min-width: 250px;
}
main {
padding: 25px;
}
.container {display:flex; flex-direction: row; flex-wrap: wrap; flex-flow: row wrap; justify-content: space-between; column-gap: 3em}
.item {flex-grow: 2; flex-basis: 40%}
h1 {
  border-bottom: 0.25em solid #93029c;
  padding: 0 1em;
  font-size: 3em;
  text-align: center;
  outline: 2px solid #93029c;
  color: #93029c;
  background-color: #fff;
}
label, legend {
  font-size: 1.3em;
  font-weight: bold;
  display: block;
  margin-top: 1em;
}
legend {background-color: #fff; color: #93029c; padding: 5px; border: 1px solid #fff; margin-top: 1em; text-align: left}
fieldset {background-color: #222; margin: 2em 0; border: 1px solid #fff; min-width: 220px}
fieldset label {font-weight: normal; display: inline}
input[type="text"],
input[type="email"],
select {
  font-size: 1.3em;
  width: 100%;
  min-width: 220px;
  padding: 0.25em;
  width: 100%
}
input[type="checkbox"], input[type="radio"] {height: 25px; width: 25px; margin-right: 1em; margin-top: 1em}
button {
  font-weight: bold;
  background-color: #93029c;
  border: 4px solid #fff;
  color: #fff;
  font-size: 2em;
  padding: 0.5em;
  width: 100%;
  margin-top: 1em;
}
button:hover,
button:focus {
  background-color: #fff;
  color: #93029c;
}
.help {color: #ccc!important;}
.error, .help {margin-bottom: 2em; color: #00ff00; font-size: 1.1em; font-weight: bold}
}
.visuallyhidden {
  border: 0 !important;
  clip: rect(0 0 0 0) !important;
  height: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: absolute !important;
  width: 1px !important;
}

              
            
!

JS

              
                
              
            
!
999px

Console