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

              
                <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>

<h1 id="title">Gaming Survey Quiz<h1>
    <div id="form-outer">
      <p id="description">
        Questions About Video Games</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="Enter Name Here" required>
    </div>
    </div>
  <div class="rowTab">
    <div class="labels">
        <label id="email-label" for="email">*Email: </label>
          </div>
     <div class="rightTab">
    <input type="email" name="email" id="email"    
class="input-field" required placeholder="Enter Email Here">                     
   </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="currentPosition"><font size="3"> Which platform do you mainly play on?</label>  
                                                                    </div> 
<div class="rightTab">                                              <select id="dropdown" name="currentPostion" class="dropdown">        <option disabled value>Select an option </option>
<option value="student">Xbox</option>
<option value="job">Playstation</option>                       
<option value="learner">PC</option>                      
<option value="preferNo">Nintendo</option> 
 <option value="other">Other</option>                                </select>            
 </div>                                                    
 </div>                                                    
 <div class="rowTab">
 <div class="labels">
 <label for="userRating">*How often do you play a week?</label>                    
 </div>   
 <div class="rightTab">
  <ul style="list-style: none;">
   <li class="radio"><label>1 Day<input name="radio-buttons" value="1"type="radio" class="userRatings"></label><li> 
    <li class="radio"><label>2-3 Days<input name="radio-buttons" value="2" type="radio" class="userRatings"></label></li> 
  <li class="radio"><label>4-5 Days<input name="radio-buttons" value="3" type="radio" class=userRatings"></label></li> 
    <li class="radio"><label>All Week<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">How much do you spend on video games: </label>
      </div>
      <div class="rightTab">
        <select id="most-like" name="mostLike" class="dropdown">
      <option disabled selected value>Select an option</option>
      <option value="challenges">0 to $50</option>
          <option value="projects">$100 to $200</option>
          <option value="community">$300 to $400</option>
          <option value="openSource">$500 or more</option>
    </select>
        </div>
    </div>
    <div class="rowTab">
      <div class="labels">
        <label for="preferences">Do you play any of the games on the side?<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">Adventure<label></li>
          <li class="checkbox"><input name="prefer" value="2" type="checkbox" class="userRatings">Action</li>
          <li class="checkbox"><label><input name="prefer" value="3" type="checkbox" class="userRatings">Arcade</label></li>
          <li class="checkbox"><label><input name="prefer" value="4" type="checkbox" class="userRatings">Online (MMORPG)</label<</li>
          <li class="checkbox"><label><input name="prefer" value="5" type="checkbox" class="userRatings">RPG (Role playing games)</label></li>
          <li class="checkbox"><label><input name="prefer" value="6" type="checkbox" class="userRatings">Simulator</label></li>
          <li class="checkbox"><label><input name="prefer" value="7" type="checkbox" class="userRatings">Sports</label></li>
          <li class="checkbox"><label><input name="prefer" value="8" type="checkbox" class="userRatings">Strategy</label></li>
          <li class="checkbox"><label><input name="prefer" value="9" type="checkbox" class="userRatings">Competitive</label></li>
          <li class="checkbox"><label><input name="prefer" value="10" type="checkbox" class="userRatings">Logic</label><li>
          <li class="checkbox"><label><input name="prefer" value="10" type="checkbox" class="userRatings">Other</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=Adamina:400,500);

html,
body{
  background-color: #B01A02;
  text-align: center;
  font-family: 'Adamina', Helvetica, sans-serif;
  min-width: 320px;
}

header{
  font-size: 2em;
  font-weight: bold;
  margin: 20px;
}
#form-outer{
  background-color: rgb(244, 244, 242);
  margin: 0 auto;
  border-radius: 4px;
  width: 75%;
  max-width: 1000px;
  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: 1px solid #c0c0c0;
  border-radius: 2px;
}

#userAge{
  width: 40px;
}
.userRating,
input[type="checkbox"] {
  float: left;
  margin-right: 5px;
}

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

JS

              
                // !! IMPORTANT README:

// You may add additional external JS and CSS as needed to complete the project, however the current external resource MUST remain in place for the tests to work. BABEL must also be left in place. 

/***********
INSTRUCTIONS:
  - Select the project you would 
    like to complete from the dropdown 
    menu.
  - Click the "RUN TESTS" button to
    run the tests against the blank 
    pen.
  - Click the "TESTS" button to see 
    the individual test cases. 
    (should all be failing at first)
  - Start coding! As you fulfill each
    test case, you will see them go   
    from red to green.
  - As you start to build out your 
    project, when tests are failing, 
    you should get helpful errors 
    along the way!
    ************/

// PLEASE NOTE: Adding global style rules using the * selector, or by adding rules to body {..} or html {..}, or to all elements within body or html, i.e. h1 {..}, has the potential to pollute the test suite's CSS. Try adding: * { color: red }, for a quick example!

// Once you have read the above messages, you can delete all comments. 

              
            
!
999px

Console