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>

 <body>
   <header>
     <h1 id="title">FreeCodeCamp Forum Survey</h1>
     <p id="description">Please fill this form to show your experience about FCC Forum</p>
   </header>

   <div id="main">
     <form id="survey-form" action="#">
       <div class="first-section">
         <label id="name-label">
           <p>Name</p>
           <input id="name" type="text" placeholder="Enter your name" required>
         </label> 
         <label id="nickname-label">
           <p id="nick-id">Forum Nickname</p>  
           <input id="nickname" type="text" placeholder="Enter your forum nickname" required>
         </label>    
       </div>

       <div class="second-section">
         <label id="email-label">
           <p id="mail-id">Email</p>
           <input id="email" type="email" placeholder="Email" required>
         </label>
         <label id="number-label">
           <p id="age-id">Age(Optional)</p>
           <input id="number" type="number" min="10" max="99" placeholder="Age">
         </label>   
       </div>  

       <p class="center">Which topic do you use the most?</p>
       <label for="dropdown">
         <select name="dropdown" id="dropdown" required>
           <option value="" selected disabled>Select one</option>
           <option value="general">General</option>
           <option value="js">Javascript</option>
           <option value="h-s">HTML-CSS</option>
           <option value="feed">Project Feedback</option>
           <option value="career">Career Advice</option>
           <option value="do-it">You can do this!</option>
           <option value="contributors">Contributors</option>
           <option value="support">FreeCodeCamp Support</option>
           <option value="guide">Guide</option>
           <option value="lang">Languages</option>
         </select>
       </label>

       <p class="center">How often do you use FCC Forum?</p>
       <div id="radio-div">
         <label for="radio1">
           <input value="radio1" id="radio1" name="radioclass" class="radio" type="radio" checked>Almost every day
         </label>
         <label for="radio2">
           <input value="radio2" id="radio2" name="radioclass" class="radio" type="radio">Sometimes
         </label>
         <label for="radio3">
           <input value="radio3" id="radio3" name="radioclass" class="radio" type="radio">When I get stuck
         </label>
         <label for="radio4">
           <input value="radio4" id="radio4" name="radioclass" class="radio" type="radio">I live inside the forum
         </label>
       </div>

       <p class="center">What is your favorite thing(s) about FCC Forum?</p>
       <div id="checkbox-div">
         <label for="supportive">
           <input value="supportive" type="checkbox" class="checkbox" name="favoritething" id="supportive">Supportive
         </label>
         <label for="network">
           <input value="network" type="checkbox" class="checkbox" name="favoritething" id="network">Network
         </label>
         <label for="community">
           <input value="community" type="checkbox" class="checkbox" name="favoritething" id="community">Community
         </label>
         <label for="solutions">
           <input value="solutions" type="checkbox" class="checkbox" name="favoritething" id="solutions">Finding solutions
         </label>
         <label for="users">
           <input value="users" type="checkbox" class="checkbox" name="favoritething" id="users">Users
         </label>
         <label for="guidance">
           <input value="guidance" type="checkbox" class="checkbox" name="favoritething" id="guidance">Guidance
         </label>
         <label for="feedback">
           <input value="feedback" type="checkbox" class="checkbox" name="favoritething" id="feedback">Feedback
         </label>
         <label for="encouragement">
           <input value="encouragement" type="checkbox" class="checkbox" name="favoritething" id="encouragement">Encouragement
         </label>
         <label for="collaboration">
           <input value="collaboration" type="checkbox" class="checkbox" name="favoritething" id="collaboration">Collaboration
         </label>
         <label for="coolplace">
           <input value="coolplace" type="checkbox" class="checkbox" name="favoritething" id="coolplace">Cool place
         </label>
       </div>

       <p class="center">If you have more to say about forum, please do so.</p>
       <textarea maxlength="500" name="textarea" id="textarea" cols="30" rows="10">Write here.</textarea>

       <button id="submit" type="submit">Submit</button>
     </form>
   </div>
</body>
              
            
!

CSS

              
                * {
    padding: 0;
    margin: 0;
}

body {
    font-family: 'Mochiy Pop P One', sans-serif;
    width: 40%;
    margin: auto;
    margin-top: 50px;
    margin-bottom: 50px;
    border: 5px solid darkblue;
    border-radius: 2em;
    padding: 3rem;
}

#description {
    margin-top: 1em;
    text-align: center;
}

header {
    border: 2.5px solid gray;
    border-radius: 1em;
    padding: 10px;
}

h1 { 
    display: flex;
    justify-content: center;
}

.center {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

#main {
    margin-top: 2.5em;
}

input {
    border: 2px solid gray;
    border-radius: 5px;
    width: 250px;
    height: 40px;
    padding-left: 10px;
    font-size: medium;
}

.first-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 0.4em 1em;
    justify-content: center;
    margin: 1em 5em 0 5em;
}

.second-section {
    display: grid;
    grid-template-columns: 1fr;
    grid-gap: 0.4em 1em;
    justify-content: center;
    margin: 1em 5em 0 5em;
    grid-template-areas: 
        "p1"
        "label1"
        "p2"
        "label2";
}

#mail-id {
    text-align: center;
}

#age-id {
    grid-area: p2;
    text-align: center;
    margin-top: 5px;
}

#email {
    display: block;
    margin: auto;
    width: 20em;
}

#number {
    display: block;
    margin: auto;
    width: 5em;
    margin-bottom: 20px;
}

#mail-age {
    display: flex;
    justify-content: space-between;
    margin: 0 5em 0 5em;
}

#dropdown {
    display: block;
    margin: auto;
    width: 300px;
    height: 40px;
    border: 2px solid gray;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: medium;
}

.radio {
    width: 15px;
    height: 15px;
    margin-top: 7px;
    margin-right: 5px;
}

#radio-div {
    margin-top: 10px;
    display: grid;
    justify-content: center;
}

.checkbox {
    width: 15px;
    height: 15px;
    margin-right: 2.5px;
}

#checkbox-div {
    display: grid;
    grid-template-columns: 200px 200px;
    grid-gap: 2.5px 20px;
    justify-content: center;
    margin-top: 10px;
}

#textarea {
    display: block;
    margin: auto;
    width: 440px;
    resize: none;
}

#submit {
    border: 1px solid blue;
    border-radius: 5px;
    margin-top: 15px !important; 
    display: block;
    margin: auto;
    width: auto;
    padding: 5px 10px 5px 10px;
    background-color: blue;
    color: white;
    font-size: larger;
    cursor: pointer;
    box-shadow: 0 5px #999;
}

#submit:hover {
    background-color: rgb(5, 5, 97);
}

#submit:active {
    background-color: rgb(5, 5, 97);
    box-shadow: 0 2px #666;
    transform: translateY(3px);
}

@media (max-width: 540px) {
    body {
        width: 80%;
        padding: 0 0 30px 0;
        border: 3px solid darkblue;
        border-radius: 1em;
    }

    .first-section {
        grid-template-columns: 1fr;
        grid-template-areas: 
        "p1"
        "label1"
        "p2"
        "label2";
    }

    #nick-id, #age-id {
        grid-area: p2;
    }

    article {
        margin-top: 15px;
    }

    #names, #mail-age {
        display: grid;
        justify-content: center;
    }

    #textarea {
        width: 300px;
    }

    #checkbox-div {
        grid-gap: 0 0;
        grid-template-columns: 200px;
    }

    .checkbox {
        margin-top: 5px;
    }
}

@media (max-width: 912px) {
    body {
        width: 80%;
        padding: 2rem;
    }
}

              
            
!

JS

              
                
              
            
!
999px

Console