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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title id="page-title">Survey Form</title>
    <link rel="stylesheet" href="stylesheet.css">
</head>

<body>
    <div class="container">
        <h1 id="title">Survey Form</h1>
        <p id="description">Let us know how we can improve freeCodeCamp</p>
        <div class="form-wrapper">
            <form method="GET" action="https://crossorigin.me/https://freecodecamp.com" id="survey-form">
                <label id="name-label" for="name">* Name:</label>
                <input type="text" name="name" id="name" class="input-field" placeholder="Enter your name" required><br>
                <label id="email-label" for="email">* Email:</label>
                <input type="email" name="email" id="email" class="input-field" placeholder="Enter your email" required><br>
                <label id="number-label" for="number">* Age:</label>
                <input type="number" name="number" id="number" class="input-field" placeholder="Enter your age"
                    required min="0" max="100"><br>
                <div id="role-section">
                    <p>Which option best describes your current role?</p>
                    <select id="dropdown">
                        <option disabled value>Select an option</option>
                        <option value="student">Student</option>
                        <option value="job">Full Time Job</option>
                        <option value="learner">Full Time Learner</option>
                        <option value="preferNo">Prefer not to say</option>
                        <option value="other">Other</option>
                    </select>
                </div>
                <div id="recommendation-section">
                    <p>* How likely is that you would recommend freeCodeCamp to a friend?</p>
                    <ul>
                        <li><input type="radio" name="likeliness" value="definitely">Definitely</li>
                        <li><input type="radio" name="likeliness" value="maybe">Maybe</li>
                        <li><input type="radio" name="likeliness" value="notSure">Not sure</li>
                    </ul>
                </div>
                <div id="like-section">
                    <p>What do you like most in FCC?</p>
                    <select id="dropdown">
                        <option disabled value>Select an option</option>
                        <option value="challenges">Challenges</option>
                        <option value="projects">Projects</option>
                        <option value="community">Community</option>
                        <option value="openSource">Open Source</option>
                        <option value="other">Other</option>
                    </select>
                </div>
                <div id="suggestions-section">
                    <p>Things that should be improved in the future <br> (Check all that apply):</p>
                    <ul>
                        <li><input type="checkbox" name="improvements" value="frontEndProjects">Front-end Projects</li>
                        <li><input type="checkbox" name="improvements" value="backEndProjects">Back-end Projects</li>
                        <li><input type="checkbox" name="improvements" value="dataVisualization">Data Visualization</li>
                        <li><input type="checkbox" name="improvements" value="challenges">Challenges</li>
                        <li><input type="checkbox" name="improvements" value="openSourceCommunity">Open Source Community</li>
                        <li><input type="checkbox" name="improvements" value="gitterHelpRooms">Gitter help rooms</li>
                        <li><input type="checkbox" name="improvements" value="videos">Videos</li>
                        <li><input type="checkbox" name="improvements" value="cityMeetups">City Meetups</li>
                        <li><input type="checkbox" name="improvements" value="wiki">Wiki</li>
                        <li><input type="checkbox" name="improvements" value="forum">Forum</li>
                        <li><input type="checkbox" name="improvements" value="additionalCourses">Additional Courses</li>
                    </ul>
                </div>
                <div id="comments">
                    <p>Any Comments or Suggestions?</p>
                    <textarea name="comments" cols="30" rows="10" placeholder="Enter your text here"></textarea>
                </div>
                <br>
                <button type="submit" id="submit">Submit</button>
            </form>
        </div>
    </div>
    <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
</body>

</html>
              
            
!

CSS

              
                .container {
    display: grid;
    grid-template-columns: 15% 35% 35% 15%;
    background-color: #CFFAE9;
}

#title {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    grid-column: span 4;
    grid-row: 1;
    text-align: center;
}

#description {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 140%;
    grid-column: 2 / 4;
    text-align: center;
}

.form-wrapper {
    grid-column: 2 / 4;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}

#survey-form {
    display: grid;
    grid-template-columns: 50% 50%;
    grid-template-rows: repeat(4, 25%);
    grid-column: 2 / 4;
    background-color: #FAF6CF;
    border-radius: 8px;
}

label {
    text-align: right;
    align-self: center;
    padding-right: 15px;
}

#name-label {
    grid-column: 1 / 2;
    grid-row: 1;
    margin: 15px 0 15px 0;
}

#name {
    grid-column: 2 / 3;
    grid-row: 1;
    margin: 15px 15px 15px 0px;
}

#email-label {
    grid-column: 1 / 2;
    grid-row: 2;
    margin-bottom: 15px;
}

#email {
    grid-column: 2 / 3;
    grid-row: 2;
    margin: 0 15px 15px 0;
}

#number-label {
    grid-column: 1 / 2;
    grid-row: 3;
}

#number {
    grid-column: 2 / 3;
    grid-row: 3;
    width: auto;
    margin: 0 15px 15px 0;
}

#role-section {
    display: inline-flex;
    grid-row: 4;
    grid-column: 1 / 3;
    margin-bottom: 10px;
}

#role-section p {
    flex-basis: 50%;
    text-align: right;
    box-sizing: border-box;
    padding-right: 15px;
    padding-left: 15px;
}

#role-section #dropdown {
    flex-basis: auto;
    height: 40px;
    align-self: center;
}

ul {
    list-style: none;
    padding-left: 0%;
}

#recommendation-section {
    display: inline-flex;
    grid-column: 1 / 3;
    padding: 15px 0 15px 0;
    background-color: #ADD8C7;
}

#recommendation-section p {
    flex-basis: 50%;
    text-align: right;
    box-sizing: border-box;
    padding-right: 15px;
    padding-left: 15px;
}

#recommendation-section #radio-buttons {
    flex-basis: auto;
    align-self: center;
}

#like-section {
    display: inline-flex;
    grid-column: 1 / 3;
    padding: 15px 0 15px 0;
    background-color: #FAF6CF;
}

#like-section p {
    flex-basis: 50%;
    text-align: right;
    box-sizing: border-box;
    padding-right: 15px;
    padding-left: 15px;
}

#like-section #dropdown {
    flex-basis: auto;
    height: 40px;
    align-self: center;
}

#suggestions-section {
    grid-column: 1 / 3;
    display: inline-flex;
    padding: 15px 0 15px 0;
    background-color: #ADD8C7;
}

#suggestions-section p {
    flex-basis: 50%;
    text-align: right;
    box-sizing: border-box;
    padding-right: 15px;
    padding-left: 15px;
    align-self: center;
}

#suggestions-section input {
    flex-basis: auto;
}

#comments {
    grid-column: 1 / 3;
    display: inline-flex;
    padding: 15px 0 15px 0;
    background-color: #FAF6CF;
}

#comments p {
    flex-basis: 50%;
    text-align: right;
    box-sizing: border-box;
    padding-right: 15px;
    padding-left: 15px;
    align-self: center;
}

#comments textarea {
    flex-basis: 50%;
    margin: 15px;
    background-color: #FFFEF2;
    border-radius: 8px;
}

#submit {
    grid-column: 1 / 3;
    margin-top: 15px;
    margin-bottom: 15px;
}

button {
    width: 50%;
    margin: auto;
}
              
            
!

JS

              
                
              
            
!
999px

Console