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>
<head>
  <style>
@import url('https://fonts.googleapis.com/css?family=Roboto+Slab');
</style>
</head>
<h1 id="title">Tribute Page Survey</h1>
<div id="form-outer">
  <p id="description">Let me know how I can improve on my tribute page (link on bottom)</p>
  <form id="survey-form">
    <div class="rowTab">
      <div class="labels">
        <label id="name-label" for="name">* Name:</label>
      </div>
      <div class="rightTab">
        <input 
type="text"
name="name"
id="name"
class="input-field"
placeholder="Enter your name" 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 your Email">
      </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="16" max="50" class="input-field" placeholder="Age">
      </div>
    </div>
    <div class="rowtab">
      <div class="labels">
        <label for="currentPos">Which option best describes your role?</label>
      </div>
      <div class="rightTab">
        <select id="dropdown" name="currentPos" class="dropdown">
          <option disabled value>Select an option</option>
          <option value="student">Full-Time Student</option>
          <option value="student">Part-Time Student</option>
          <option value="job">Full-Time Job</option>
          <option value="job">Part-Time Job</option>
          <option value="preferNo">prefer not to say</option>
          <option value="other">Other</option>
        </select>
      </div>
      </div>
    <div class="rowTab">
      <div class="labels">
        <label for="userRating">* How likely are you to recommend my tribute page to a friend?</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 the tribute page: </label>
      </div>
      <div class="rightTab">
        <select id="most-like" name="mostLike" class="dropdown">
          <option disabled selected value>Select an option</option>
          <option value="pictures">Picture</option>
          <option value="backgrounds">Background</option>
          <option value="cleanCode">Cleanliness of code</option>
          <option value="openSource">Open Source</option>
        </select>
          </div>
        </div>
    <div class="rowTab">
      <div class="labels">
        <label for="preferences">Things that should be improved in the future<br>(chack 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"> Cleanliness of code</label> </li>
          <li class="checkbox"> <input name="prefer" value="2" type="checkbox" class="userRatings"> Picture</li>
          <li class="checkbox"> <label><input name="prefer" value="3" type="checkbox" class="userRating"> Background</label></li>
          <li class="checkbox"> <label><input name="prefer" value="4" type="checkbox" class="userRatings"> Organization of Code</label>
            <li/>
          <li class="checkbox"> <label><input name="prefer" value="5" type="checkbox" class="userRarings"> Open Source</lable> </li>
          <li class="checkbox"> <label><input name="prefer" value="6" Type="checkbox" class="userRatings"> Biography</label></li>
          <li class="checkbox"> <label><input name="prefer" value="7" type="checkbox" class="userRatings">Wiki</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>
<div class="footer"><a href="https://codepen.io/albert-rubio/full/YJROpG">click here</a> for tribute page. Made by &copyAlbert Rubio</a>
</div>
           
           

      
        

      

              
            
!

CSS

              
                html,
body {
  background-color: hsl(210, 100%, 60%);
  text-align: 
center;
  font-family: 'Roboto Slab', 
    helvetica, sans-serif;
  min-width: 300px;
}
header {
  font-size: 2.5em;
  font-weight: bold;
  margin: 20px;
}

#form-outer {
  background-color:
rgb(250, 250, 250);
  margin: 0 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: center;
}

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

#userAge {
  width: 40px;
}

.userRatings, 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;
}

.dropdown {
  height: 35px;
  width: 140px;
  padding: 5px;
  margin: 10px;
  margin-top: 15px;
  border: 1px solid #c0c0c0;
  border-radius: 2px;
}

.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

              
                // !! 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