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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <h1 id="title">Survey Form</h1>
<div id="form-outer">
  <p id="description">
    Let Ninjacat know how it can improve its skills
  </p>
  <form id="survey-form" method="GET" action="https://crossorigin.me/https://freecodecamp.com">
    <div class="rowTab">
      <div class="labels">
        <label id="name-label" for="name">Name: </label>
      </div>
      <div class="rightTab">
        <input autofocus type="text" name="name" id="name" class="input-field" placeholder="your name" required>
      </div>
    </div>
    <div class="rowTab">
      <div class="labels">
        <label id="email-label" for="email">E-mail: </label>
      </div>
      <div class="rightTab">
        <input type="email" name="email" id="email" class="input-field" required placeholder="your e-mail">
      </div>
    </div>
    <div class="rowTab">
      <div class="labels">
        <label id="number-label" for="age">Age: </label>
      </div>
      <div class="rightTab">
        <input type="number" name="age" id="number" min="1" max="125" class="input-field" placeholder="age">
      </div>
    </div>
    <div class="rowTab">
      <div class="labels">
        <label for="currentPos">Which option best describes your current role?</label>
      </div>
      <div class="rightTab">
        <select id="dropdown" name="currentPos" class="dropdown">
      <option disabled value>Select an option</option>
      <option value="learner">Padawan</option>
      <option value="preferNo">Jedi</option>
      <option value="preferNo">Sith Lord</option>
      <option value="preferNo">Sensei</option>
      <option value="preferNo">Sellsword</option>
      <option value="preferNo">Elite Tauren Chieftain</option>
      <option value="other">Other</option>
    </select>
      </div>
    </div>
    <div class="rowTab">
      <div class="labels">
        <label for="userRating">How likely is it that Ninjacat would defeat Chuck Norris in a duel to the death?</label>
      </div>
      <div class="rightTab">
        <ul style="list-style: none;">
          <li class="radio"><label>Definitely<input name="radio-buttons" value="1"  type="radio" class="userRatings" ></label></li>
          <li class="radio"><label>Maybe<input name="radio-buttons" value="2"  type="radio" class="userRatings" ></label></li>
          <li class="radio"><label>Not sure<input name="radio-buttons" value="3"  type="radio" class="userRatings" ></label></li>
        </ul>
      </div>
    </div>
    <div class="rowTab">
      <div class="labels">
        <label for="most-like">What do you like most about Ninjacat: </label>
      </div>
      <div class="rightTab">
        <select id="most-like" name="mostLike" class="dropdown">
      <option disabled selected value>Select an option</option>
      <option value="challenges">One-lick-knockout</option>
      <option value="projects">Death-purr</option>
      <option value="community">Petrifying Gaze of the Black Lotus</option>
      <option value="openSource">Hunger of the Thousand Claws</option>
    </select>
      </div>
    </div>
    <div class="rowTab">
      <div class="labels">
        <label for="preferences">Things that Ninjacat must improve in order to stay on top of its game:<br>(Check all that apply): </label>
      </div>
      <div class="rightTab">
        <ul id="preferences" style="list-style: none;">
          <li class="checkbox"><label><input name="prefer" value="1" type="checkbox" class="userRatings">One-paw pushups</label></li>
          <li class="checkbox"><input name="prefer" value="2" type="checkbox" class="userRatings">Mountain hopping by night</li>
          <li class="checkbox"><label><input name="prefer" value="3" type="checkbox" class="userRatings">Cybernetic prosthetics</label></li>
          <li class="checkbox"><label><input name="prefer" value="4" type="checkbox" class="userRatings">Nanowarfare research</label></li>
          <li class="checkbox"><label><input name="prefer" value="5" type="checkbox" class="userRatings">Morning milk scrying</label></li>
          <li class="checkbox"><label><input name="prefer" value="6" type="checkbox" class="userRatings">Chasing hulk-rats while blindfolded</label></li>
          <li class="checkbox"><label><input name="prefer" value="7" type="checkbox" class="userRatings">Sofa-scratching routine</label></li>
          <li class="checkbox"><label><input name="prefer" value="8" type="checkbox" class="userRatings">Mastering the Th'um of M'Eow</label></li>
          <li class="checkbox"><label><input name="prefer" value="9" type="checkbox" class="userRatings">Elor bindel felallan morin'aminor</label></li>
          <li class="checkbox"><label><input name="prefer" value="10" type="checkbox" class="userRatings">One cannot improve what has been made perfect already</label></li>
         
        </ul>
      </div>
    </div>
    <div class="rowTab">
      <div class="labels">
        <label for="comments">Any comments or suggestions?</label>
      </div>
      <div class="rightTab">
        <textarea id="comments" class="input-field" style="height:50px;resize:vertical;" name="comment" placeholder="Enter your comment here..."></textarea>
      </div>
    </div>
    <button id="submit" type="submit">Submit</button>
  </form>
</div>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Raleway:400,500);

html,
body {
  background-color: #88A5BD;
  color: #002626;
  text-align: center;
  font-family: "Raleway", Helvetica, sans-serif;
  min-width: 320px;
}

header {
  font-size: 2em;
  font-weight: bold;
  margin: 20px;
}

#title {
  color: #FC4949;
  background-color: #F7CB5C;
  margin: 0 auto;
  border-radius: 4px;
  width: 75%;
  max-width: 900px;
  padding: 10px;
  padding-top: 20px;
  font-size: 3em;
  font-weight: bold;
}

#description {
  color: #002626;
  font-weight: bold;
  
}
#form-outer {
  background-color: #FFF4E0;
  margin: 5px auto;
  border-radius: 4px;
  width: 75%;
  max-width: 900px;
  padding: 10px;
  padding-top: 20px;
}

.labels {
  display: inline-block;
  text-align: right;
  width: 40%;
  padding: 5px;
  vertical-align: top;
  margin-top: 10px;
}

.rightTab {
  display: inline-block;
  text-align: left;
  width: 48%;
  vertical-align: middle;
}

.input-field {
  height: 20px;
  width: 280px;
  padding: 5px;
  margin: 10px;
  border: 2px solid #88A5BD;
  border-radius: 5px;
}

#userAge {
  width: 40px;
}

.userRatings,
input[type="checkbox"] {
  float: left;
  margin-right: 5px;
}

#submit {
  background-color: #00ADB5;
  border-radius: 4px;
  color: white;
  font-size: 1em;
  height: 40px;
  width: 96px;
  margin: 10px;
  border: 0px solid;
}

.dropdown {
  background-color: #fff;
  height: 35px;
  width: 140px;
  padding: 5px;
  margin: 10px;
  margin-top: 15px;
  border: 2px solid #88A5BD;
  border-radius: 5px;
}

.radio,
.checkbox {
  position: relative;
  left: -43px;
  margin-left: 10px;
  display: block;
  padding-bottom: 10px;
}

@media screen and (max-width: 833px) {
  .input-field {
    width: 80%;
  }
  select {
    width: 90%;
  }
}

@media screen and (max-width: 520px) {
  .labels {
    width: 100%;
    text-align: left;
  }
  .rightTab {
    width: 80%;
    float: left;
  }
  .input-field {
    width: 100%;
  }
  select {
    width: 100%;
  }
}

              
            
!

JS

              
                // coded by @SamAI-Software
const projectName = 'survey-form';
localStorage.setItem('example_project', 'Survey Form');
              
            
!
999px

Console