Pen Settings

HTML

CSS

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

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

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.

HTML

              
                <form class="topLabel">

  <header class="form-header">
    <h2>A Form of Fantasy</h2>
    <div>"The gift of fantasy has meant more to me than my talent for absorbing positive knowledge." - Albert Einstein</div>
  </header>
  
  <ul>
  
    <li id="form-field-1">
      <fieldset>
        <legend>
          Which is better?
        </legend>
        <div>
          <span>
            <input id="Field1_0" name="Field1" type="radio" class="field radio" value="Fantasty" checked="checked" />
            <label class="choice" for="Field1_0" >
              Fantasty
            </label>
          </span>
          <span>
            <input id="Field1_1" name="Field1" type="radio" class="field radio" value="Sci-Fi" />
            <label class="choice" for="Field1_1" >
              Sci-Fi
            </label>
          </span>
          <span>
            <input id="Field1_2" name="Field1" type="radio" class="field radio" value="Don&#039;t make me choose!" />
            <label class="choice" for="Field1_2" >
              Don't make me choose!
            </label>
          </span>
          <span>
            <input id="Field1_3" name="Field1" type="radio" class="field radio" value="I don&#039;t like either" />
            <label class="choice" for="Field1_3" >
              I don't like either
            </label>
          </span>
        </div>
      </fieldset>
    </li>
    
    <li id="form-field-2">
      <label class="desc" id="title2" for="Field2">
      How much would you donate to a Kickstarter to bring back Firefly?
      </label>
      <span class="symbol">$</span>
       <span>
        <input id="Field2" name="Field2" type="text" class="field text currency nospin" value="" size="10" />
        <label for="Field2">Dollars</label>
      </span>
      <span class="symbol radix">.</span>
      <span class="cents">
        <input id="Field2-1" name="Field2-1" type="text" class="field text nospin" value="" size="2" maxlength="2" />
        <label for="Field2-1">Cents</label>
      </span>
    </li>
    
    <li id="form-field-3" class="likert">
      <table cellspacing="0">
        <caption id="title3">
          Rate the Star Wars movies
        </caption>
        <thead>
          <tr>
            <th>&nbsp;</th>
            <td>Didn't Like At All</td>
            <td>Meh</td>
            <td>Kinda Liked</td>
            <td>Loved!</td>
          </tr>
        </thead>
        <tbody>
          <tr class="statement3">
            <th>
              <label for="Field3">Episode I - The Phantom Menace</label>
            </th>
            <td title="Didn&#039;t Like At All">
              <input id="Field3_1" name="Field3" type="radio" value="Didn&#039;t Like At All" />
              <label for="Field3_1">1</label>
            </td>
            <td title="Meh">
              <input id="Field3_2" name="Field3" type="radio" value="Meh" />
              <label for="Field3_2">2</label>
            </td>
            <td title="Kinda Liked">
              <input id="Field3_3" name="Field3" type="radio" value="Kinda Liked" />
              <label for="Field3_3">3</label>
            </td>
            <td title="Loved!">
              <input id="Field3_4" name="Field3" type="radio" value="Loved!" />
              <label for="Field3_4">4</label>
            </td>
          </tr>
          <tr class="alt statement4">
            <th>
               <label for="Field4">Episode II - Attack of the Clones</label>
            </th>
            <td title="Didn&#039;t Like At All">
              <input id="Field4_1" name="Field4" type="radio" value="Didn&#039;t Like At All" />
              <label for="Field4_1">1</label>
            </td>
            <td title="Meh">
              <input id="Field4_2" name="Field4" type="radio" value="Meh" />
              <label for="Field4_2">2</label>
            </td>
            <td title="Kinda Liked">
              <input id="Field4_3" name="Field4" type="radio" value="Kinda Liked" />
              <label for="Field4_3">3</label>
            </td>
            <td title="Loved!">
              <input id="Field4_4" name="Field4" type="radio" value="Loved!" />
              <label for="Field4_4">4</label>
            </td>
            </tr>
              <tr class="statement5">
              <th><label for="Field5">Episode III - Revenge of the Sith</label></th>
            <td title="Didn&#039;t Like At All">
              <input id="Field5_1" name="Field5" type="radio" value="Didn&#039;t Like At All" />
              <label for="Field5_1">1</label>
            </td>
            <td title="Meh">
              <input id="Field5_2" name="Field5" type="radio" value="Meh" />
              <label for="Field5_2">2</label>
            </td>
            <td title="Kinda Liked">
              <input id="Field5_3" name="Field5" type="radio" value="Kinda Liked" />
              <label for="Field5_3">3</label>
            </td>
            <td title="Loved!">
              <input id="Field5_4" name="Field5" type="radio" value="Loved!" />
              <label for="Field5_4">4</label>
            </td>
          </tr>
          <tr class="alt statement6">
            <th>
              <label for="Field6">Episode IV - A New Hope</label>
            </th>
            <td title="Didn&#039;t Like At All">
              <input id="Field6_1" name="Field6" type="radio" value="Didn&#039;t Like At All" />
              <label for="Field6_1">1</label>
            </td>
            <td title="Meh">
              <input id="Field6_2" name="Field6" type="radio" value="Meh" />
              <label for="Field6_2">2</label>
            </td>
            <td title="Kinda Liked">
              <input id="Field6_3" name="Field6" type="radio" value="Kinda Liked" />
              <label for="Field6_3">3</label>
            </td>
            <td title="Loved!">
              <input id="Field6_4" name="Field6" type="radio" value="Loved!" />
              <label for="Field6_4">4</label>
            </td>
          </tr>
          <tr class="statement7">
            <th>
              <label for="Field7">Episode V - The Empire Strikes Back</label>
            </th>
            <td title="Didn&#039;t Like At All">
              <input id="Field7_1" name="Field7" type="radio" value="Didn&#039;t Like At All" />
              <label for="Field7_1">1</label>
            </td>
            <td title="Meh">
              <input id="Field7_2" name="Field7" type="radio" value="Meh" />
              <label for="Field7_2">2</label>
            </td>
            <td title="Kinda Liked">
              <input id="Field7_3" name="Field7" type="radio" value="Kinda Liked" />
              <label for="Field7_3">3</label>
            </td>
            <td title="Loved!">
              <input id="Field7_4" name="Field7" type="radio" value="Loved!" />
              <label for="Field7_4">4</label>
            </td>
          </tr>
          <tr class="alt statement8">
            <th>
              <label for="Field8">Episode VI - Return of the Jedi</label>
            </th>
            <td title="Didn&#039;t Like At All">
              <input id="Field8_1" name="Field8" type="radio" value="Didn&#039;t Like At All" />
              <label for="Field8_1">1</label>
            </td>
            <td title="Meh">
              <input id="Field8_2" name="Field8" type="radio" value="Meh" />
              <label for="Field8_2">2</label>
            </td>
            <td title="Kinda Liked">
              <input id="Field8_3" name="Field8" type="radio" value="Kinda Liked" />
              <label for="Field8_3">3</label>
            </td>
            <td title="Loved!">
              <input id="Field8_4" name="Field8" type="radio" value="Loved!" />
              <label for="Field8_4">4</label>
            </td>
          </tr>
        </tbody>
      </table>
    </li>
    
    <li id="form-field-4">
      <label class="desc" id="title104" for="Field104">
        Are you caught up on Game of Thrones?
      </label>
      <div>
        <select id="Field104" name="Field104" class="field select medium" tabindex="31" > 
          <option value="Never seen it" selected="selected">
            Never seen it
          </option>
          <option value="Yep, totally caught up" >
            Yep, totally caught up
          </option>
          <option value="I&#039;ve seen some but I&#039;m not caught up" >
            I've seen some but I'm not caught up
          </option>
        </select>
      </div>
    </li>
    
    <li id="form-field-5">
      <label class="desc" id="title107" for="Field107">
      What is your favorite Fantasty or Sci-Fi movie of all time?
      </label>
      <div>
      <input id="Field107" name="Field107" type="text" class="field text medium" value="" maxlength="255" tabindex="32" onkeyup="" />
      </div>
    </li>
  
    <li id="form-field-6" class="section">
      <section>
        <h3 id="title108">
          Your Information
        </h3>
      </section>
    </li>
    
    <li id="form-field-7">
      <label class="desc" id="title105" for="Field105">
        Name
      </label>
      <span>
        <input id="Field105" name="Field105" type="text" class="field text fn" value="" size="8" tabindex="33" />
        <label for="Field105">First</label>
      </span>
      <span>
        <input id="Field106" name="Field106" type="text" class="field text ln" value="" size="14" tabindex="34" />
        <label for="Field106">Last</label>
      </span>
    </li>
    
    <li id="form-field-8">
      <label class="desc" id="title110" for="Field110">
        Email
      </label>
      <div>
        <input id="Field110" name="Field110" type="email" spellcheck="false" class="field text medium" value="" maxlength="255" /> 
      </div>
    </li>
    
    <li id="form-field-9">
      <label class="desc" id="title117" for="Field117">
        Website
      </label>
      <div>
        <input id="Field117" name="Field117" type="url" class="field text medium" value="" maxlength="255" tabindex="36" /> 
      </div>
    </li>
    
    <li class="buttons">
      <div>
        <input id="saveForm" name="saveForm" class="btTxt submit" 
        type="submit" value="Submit"
     />
      </div>
    </li>
 
  </ul>
  
</form>
              
            
!

CSS

              
                body {
  font-family: "Lucida Grande","Lucida Sans Unicode", Tahoma, sans-serif;
  line-height: 1.4;
  padding: 30px;
}

.form-header {
  margin: 0 0 1em 0;
  padding: 0 0 1em 0;
  border-bottom: 1px dotted #ccc
}

.text {
  font-size: 120%;
}

form ul {
  padding: 0;
}
form li {
  list-style: none;
  padding: 0.5em;
  clear: both;
  overflow: hidden;
  position: relative;
}
form li span {
  margin: 0 .3em 0 0;
  float: left;
}
form li div span {
  margin: 0;
  display: block;
  width: 100%;
  float: left;
}
label span,
.section span,
p span,
.likert span {
  display: inline;
  float: none;
}
form li div label,
form li span label {
  font-size: 80%;
  padding-top: 0.25em;
  clear: both;
  display: block;
}
fieldset {
  display: block;
  border: none;
  margin: 0;
  padding: 0;
}
label.desc,
legend { 
  font-weight: bold;
  color: #222;
  padding: 0 0 0.15em 0;
  margin: 0 0 0.15em 0;
  display: block;
}
label.choice {
  display: block;
  cursor: pointer;
  font-size: 100%;
  line-height: 150%;
  margin: -1.25em 0 0 1.5em;
  padding: 0 0 0.25em 0;
}
.likert table {
  margin: 0 0 1em 0;
  width: 100%;
  border: 1px solid #dedede;
}
.likert caption {
  font-weight: bold;
  text-align: left;
  margin: 0 0 0.5em 0;
}
.likert input {
  margin: 0.25em 0;
}
.likert tbody td label {
  display: block;
}
.likert thead td,
.likert thead th {
  background-color: #e6e6e6
}
.likert td {
  border-left: 1px solid #ccc;
  text-align: center;
  padding: 0.25em;
  width: 100px;
}
.likert thead td {
  font-size: 85%;
  padding: 10px 6px;
}
.likert th,
.likert td { 
  border-bottom: 1px solid #dedede;
}
.likert tbody th {
  padding: 8px 8px;
  text-align: left;
}
.likert tbody th label {
  color: #222;
  font-weight: bold
}
.likert tbody tr.alt td,
.likert tbody tr.alt th {
  background-color: #f5f5f5;
}
.likert tbody tr:hover td,
.likert tbody tr:hover th {
  background-color:#FFFFCF;
}
form li.section {  
  padding: 1em 0 0 0;
}
form li.section h3 {
  font-size: 110%;
  line-height: 135%;
  margin: 0 0 3px 0;
  padding: 12px 1% 0 1%;
  border-top: 1px dotted #ccc
}
              
            
!

JS

              
                
              
            
!
999px

Console