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.



  <p>* indicates a field is required</p>
    <label for="first">First Name:
      <input type="text" id="first" name="first"></label>
    <label for="last">Last Name: *
      <input type="text" id="last" name="last" required>
    <label for="term">Term: *
      <input type="text" id="term" name="term" required pattern="\d" placeholder="digits only" aria-describedby="desc-term">
      <span id="desc-term">Term must be a single digit.</span>


    <label for="dav">
      <input type="radio" id="dav" name="campus" value="D">Brampton

    <label for="hmc">
      <input type="radio" id="hmc" name="campus" value="M">Mississauga

    <label for="traf">
      <input type="radio" id="traf" name="campus" value="O" checked>Oakville
  <div><input type="submit" value="Submit"></div>


                /* basic styling */
html, body {
  font: 20px Arial,sans-serif;
div {
  margin: 0.3em 0.1em;
fieldset > label {
  margin-right: 0.75em;

/* validation stuff */
input:required {
  background-color: #fff9c4;

/* if you add a background colour for invalid fields, 
this background colour will override the background 
colour set on :required fields when those :required 
fields are empty - try it! */
input:invalid {
  /*background-color: #FFCDD2;*/
  outline: 0.15em solid red;