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

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>
  <meta charset=utf-8>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Oboarding Survey</title>
</head>
<main id="main" class="main">

  <body>
    <header id="header" class="header">
      <h1 id="title" class="title"> New Hire Onboarding </h1>
    </header>
    <div id="content" class="content">
      <p id="description" class="description">Please fill out this quick survey prior to your first date of hire:</p>
      <form id="survey-form" class="survey-form">
        <div id="user-info" class="user-info">
          <h3 id="user-info-title" class="section-title">Employee Information</h3>
          <label id="name-label"> First Name: <input id="name" type="text" placeholder="First Name" required></label> <label> Last Name: <input id="lastname" type="text" placeholder="Last Name" required></label>
          <label>Middle Name: <input id="middlename" type="text" placeholder="Middle Name"></label>
          <label>Street Address: <input id=streetaddress type=text placeholder="Street Address" required></label>
          <label> City: <input id=city type=text placeholder="City" required></label>
          <label> State: <br> <select id=dropdown required>
	<option value="AL">Alabama</option>
	<option value="AK">Alaska</option>
	<option value="AZ">Arizona</option>
	<option value="AR">Arkansas</option>
	<option value="CA">California</option>
	<option value="CO">Colorado</option>
	<option value="CT">Connecticut</option>
	<option value="DE">Delaware</option>
	<option value="DC">District Of Columbia</option>
	<option value="FL">Florida</option>
	<option value="GA">Georgia</option>
	<option value="HI">Hawaii</option>
	<option value="ID">Idaho</option>
	<option value="IL">Illinois</option>
	<option value="IN">Indiana</option>
	<option value="IA">Iowa</option>
	<option value="KS">Kansas</option>
	<option value="KY">Kentucky</option>
	<option value="LA">Louisiana</option>
	<option value="ME">Maine</option>
	<option value="MD">Maryland</option>
	<option value="MA">Massachusetts</option>
	<option value="MI">Michigan</option>
	<option value="MN">Minnesota</option>
	<option value="MS">Mississippi</option>
	<option value="MO">Missouri</option>
	<option value="MT">Montana</option>
	<option value="NE">Nebraska</option>
	<option value="NV">Nevada</option>
	<option value="NH">New Hampshire</option>
	<option value="NJ">New Jersey</option>
	<option value="NM">New Mexico</option>
	<option value="NY">New York</option>
	<option value="NC">North Carolina</option>
	<option value="ND">North Dakota</option>
	<option value="OH">Ohio</option>
	<option value="OK">Oklahoma</option>
	<option value="OR">Oregon</option>
	<option value="PA">Pennsylvania</option>
	<option value="RI">Rhode Island</option>
	<option value="SC">South Carolina</option>
	<option value="SD">South Dakota</option>
	<option value="TN">Tennessee</option>
	<option value="TX">Texas</option>
	<option value="UT">Utah</option>
	<option value="VT">Vermont</option>
	<option value="VA">Virginia</option>
	<option value="WA">Washington</option>
	<option value="WV">West Virginia</option>
	<option value="WI">Wisconsin</option>
	<option value="WY">Wyoming</option>
           </select></label>
          <label> Zip Code: <input id="zipcode" type=numeric pattern="[0-9]{5}" placeholder="Zip Code" required></label>
          <label id="email-label">Email Address: <input id="email" type="email" placeholder="Email Address" required></label>
        </div>
        <div id="demographics" class="demographics">
          <h3 id=demographic-info class="section-title">Demographic Information</h3>
          <label>Date of Birth: <input id="dob" type="date" required></label>
          <label id="number-label">Age: <input id="number" type="number" placeholder="Age" min="1" max="110"></label><br><br>
          <div id="demo-container" class="demo-container">
          <div id="gender-form" class="gender-form">
            <label>Gender: </label><br><input type=radio name="gender" value="male" checked> Male<br><input type=radio name="gender" value="female"> Female <br><input type=radio name="gender" value="other"> Other<br></div>
          <div id="ethnicity-form" class="ethnicity-form">
            <label>Race/Ethnicity: </label><br>
            <input type="checkbox" name="ethnicity" value="White"> White<br>
            <input type="checkbox" name="ethnicity" value="Black"> Black<br>
            <input type="checkbox" name="ethnicity" value="Asian"> Asian<br>
            <input type="checkbox" name="ethnicity" value="Native American">Native American<br>
            <input type="checkbox" name="ethnicity" value="Pacific Islander"> Pacific Islander<br>
          </div>
          <div id="veteran-form" class="veteran-form">
            <label>Veteran Status: </label><br>
            <input type="radio" name="veteran" value="Yes"> Yes<br>
            <input type="radio" name="veteran" value="No"> No<br>
            <input type="radio" name="veteran" value="Disabled Veteran"> Disabled Veteran<br>
            <input type="radio" name="veteran" value="Other Protected Veteran"> Other Protected Veteran<br>
          </div>
           <label id="additional-comments" class="additional comments"> Additional Comments: </label>
            <textarea id="comment-text-area" class="comment-text-area" rows="4" cols="50" wrap="soft" form="survey-form">Enter comments here...</textarea>
          </div><br><br>
        </div>
        <div id="submit-area" class="submit-area">
          <input id="submit" class="submit" type="submit" value="Submit">
          <input id="reset" class="reset" type="reset" value="Reset">
        </div>
      </form>
    </div>
  </body>
  <footer id="footer" class="footer">
    <p>Copyright 2019 Joe Nicastro<br>Created for Survey Page Project in freeCodeCamp</p>
  </footer>
</main>
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css?family=Merriweather:400,400i,700");
.main {
  display: grid;
  grid-template-areas:
    "header"
    "content"
    "footer";
  background: linear-gradient(180deg, #b2b5c1, #0327b5);
}
.content {
  background: clear
  grid-area: content;
  margin: 0 90px;
  display: grid;
  grid-template-areas:
    "user-info"
    "demographics"
    "submit-area";
}
.user-info {
  background: #efefef;
  grid-area: user-info;
  margin: 0 40px;
  padding: 10px;
}
.demographics {
  background: #efefef;
  grid-area: demographics;
  margin: 0 40px;
  padding: 10px;
}
.submit-area {
  background: #efefef;
  grid-area: education;
  margin: 0 40px;
  text-align: center; 
  padding: 10px;
}
.footer {
  background: clear;
  grid-area: footer;
  text-align: center;
  font-size: 10px;
}
.title {
  text-align: center;
  font-family: "Merriweather", "Times"; 
}
p.description {
  padding-left: 15px;
  font-weight: bold;
  font-size: 15px
}
h3.section-title {
  text-align: center;
}
label{
  margin: 10px 10px;
  font-weight: bold;
}
input[type="text"]{
  width: 100%;
  padding: 12px 20px;
  margin: 8px 0;
  box-sizing: border-box;
}
input[type="numeric"]{
  width: 100%;
  padding: 12px 20px;
  margin: 8px 0;
  box-sizing: border-box;
}
input[type="email"]{
  width: 100%;
  padding: 12px 20px;
  margin: 8px 0;
  box-sizing: border-box;
}
input[type="date"]{
  width: 20%;
  padding: 12px 20px;
  margin: 8px 10px 8px 0px;
  box-sizing: border-box;
}
input[type="number"]{
  width: 20%;
  padding: 12px 20px;
  margin: 8px 0;
  box-sizing: border-box;
}
select {
  width: 100%;
  padding: 12px 20px;
  margin: 8px 0;
  box-sizing: border-box;
}
input[type="radio"]{
  width: 5%;
  padding: 12px 20px;
  margin: 8px 0;
  box-sizing: border-box;
}
input[type="checkbox"]{
  width: 5%;
  padding: 12px 20px;
  margin: 8px 0;
  box-sizing: border-box;
}
div.demo-container {
  display: grid;
  grid-template-areas:
    "gender ethnicity veteran";
  grid-template-columns: 200px 200px 200px
}
div.gender-form {
  display: inline-block;
  grid-area: gender;
  margin: 0px 0px 30px 20px;
}
div.ethnicity-form {
  display: inline-block;
  grid-area: ethnicity;
}
div.veteran-form {
  display: inline-block;
  grid-area: veteran;
}
textarea.comment-text-area {
  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