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

              
                  <header>
    <h1 id = "title">freeCodeCamp Survey Form</h1>
    <p id = "description">Thank you for taking the time to help us improve the platform</p>
    </header>

    <div>
    <form action = "" id = "survey-form" >

        <label for = "name" id = "name-label">
        Name <br>
        <input type="text" placeholder = "Enter your name" id = "name" required>
        </label>

        <label for = "email" id = "email-label">
        Email <br>
        <input type="email" placeholder = "Enter your Email" id = "email" required>
        </label>

        <label for = "number" id = "number-label">
        Age (optional)
        <input type="number" placeholder = "Age" id = "number" min="10" max="100">
        </label>

        Which option best describes your current role? <br>
        <select id = "dropdown" name = "role">
            <option value="" disabled selected>Select current role</option>
            <option value =  "Student">Student</option>
            <option value = "Full Time Job">Full Time Job</option> 
            <option value = "Full Time Learner">Full Time Learner</option>
            <option value = "Prefer not to say">Prefer not to say</option>
            <option value = "Other">Other</option>
        </select>
      
        Would you recommend freeCodeCamp to a friend?  
        <br>
        
        <label for = "definitely"><input id = "definitely" type = "radio"  name = "rec" value = "definitely"> Definitely </label><br>

        <label for = "maybe">
        <input id = "maybe" type = "radio" name = "rec" value = "maybe"> Maybe
        </label><br>

        <label for = "not sure">
        <input id = "not sure" type = "radio" name = "rec" value = "not sure"> Not sure
        </label>
        <br>
        
       
        What is your favorite feature of freeCodeCamp?
        <br>

        <select id = "dropdown2" name = "feature">
            <option value="" disabled selected>Select an option</option>
            <option value =  "Challenges">Challenges</option>
            <option value = "Projets">Projects</option> 
            <option value = "Community">Community</option>
            <option value = "Open Source">Open Source</option>
        </select>
        
        <br>
        What would you like to see improved? (Check all that apply)
        <br>

        <label for = "front-end">
            <input id = "front-end" type = "checkbox" name = "improve" value = "Front-end Projects"> Front-end Projects
        </label> <br>

        <label for = "back-end">
            <input id = "back-end" type = "checkbox" name = "improve" value = "Back-end Projects"> Back-end Projects
        </label> <br>

        <label for = "data">
            <input id = "data" type = "checkbox" name = "improve" value = "Data Visualization"> Data Visualization
        </label> <br>

        <label for = "challenges">
            <input id = "challenges" type = "checkbox" name = "improve" value = "Challenges"> Challenges
        </label> <br>

        <label for = "open">
            <input id = "open" type = "checkbox" name = "improve" value = "Open Source Community"> Open Source Community
        </label> <br>

        <label for = "gitter">
            <input id = "gitter" type = "checkbox" name = "improve" value = "Gitter help rooms"> Gitter help rooms
        </label> <br>

        <label for = "videos">
            <input id = "videos" type = "checkbox" name = "improve" value = "Videos"> Videos
        </label> <br>

        <label for = "city">
            <input id = "city" type = "checkbox" name = "improve" value = "City Meetups"> City Meetups
        </label> <br>

        <label for = "wiki">
            <input id = "wiki" type = "checkbox" name = "improve" value = "Wiki"> Wiki
        </label> <br>

        <label for = "forum">
            <input id = "forum" type = "checkbox" name = "improve" value = "Forum"> Forum
        </label> <br>

        <label for = "additional">
            <input id = "additional" type = "checkbox" name = "improve" value = "Additional Courses"> Additional Courses
        </label> <br>

        Any comments or suggestions?
        <br>

        <label for = "comment">
        <textarea id="comment" name="comments" placeholder="Enter your comments here..."></textarea>
        </label>
        
        <input type="submit" value="Submit" id = "submit">






    </form>
    </div>
              
            
!

CSS

              
                body {
    background-image: url('sunset.webp');
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
}

header {
    text-align: center;
    color: white;
}

div {
    width: 50%;
    margin: auto;
    background-color: rgba(235, 121, 121, 0.5);
    padding: 20px;
    color:white;
    font-size: 20px;

}

input[type=text] {
    width: 100%;
    padding: 12px 15px;
    margin: 8px 0;
    box-sizing: border-box;
}

input[type=email] {
    width: 100%;
    padding: 12px 15px;
    margin: 8px 0;
    box-sizing: border-box;
}

input[type=number] {
    width: 100%;
    padding: 12px 15px;
    margin: 8px 0;
    box-sizing: border-box;
}

/* input {
    width: 100%;
    padding: 12px 15px;
    margin: 8px 0;
    box-sizing: border-box;
} */

/* input[type=radio] {
 display: block;
   
} */

select {
    width: 100%;
    /* height: 50px; */
    padding: 20px 30px;
    margin: 8px 0;
    font-size: 15px;
    box-sizing: border-box;
}

/* select {
    width: 100%;
    padding: 16px 20px;
    border: none;
    border-radius: 4px;
    
} */

/* ::-webkit-input-placeholder { Chrome/Opera/Safari 
    color: pink;
    font-size: 20px;
  } */

  textarea {
    margin-top: 10px;  
    width: 100%;
    height: 300px;
  }

  input[type=submit] {
    background-color: #44bd48;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    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