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

              
                <!DOCTYPE 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">
        <link rel="stylesheet" href="style.css">
        <title>Survey Form</title>
    </head>

    <main>
        <body>
            <h1 id="title">Delivery Survey Form</h1>
            <p id="description">Lets know how to serve you better...</p>
            <form id="survey-form" action="">
                <div id="top-center">
                    <label for="name" id="name-label">Name:</label> 
                    <input type="text" id="name" placeholder="Input your name" required>
                </div>
                <div id="top-center">
                    <label id="email-label">Email:</label> 
                    <input type="email" id="email" placeholder="Input your email" required>
                </div>
                <div id="top-center">
                    <label id="number-label">Age:</label> 
                    <input min="10" max="60" type="number" id="number" placeholder="Age" required>
                </div>
                <div id="selections">
                    <h4>Gender:</h4>
                    <select name="" id="dropdown">
                    <option value="1">Select</option>
                    <option value="2">Male</option>
                    <option value="3">Female</option>
                    <option value="4">Others</option>
                    <option value="5">Rather not say</option>
                    </select>
                    <h4>Are you presently satisfied with our services?:</h4>
                    Definately<input  name="radio-buttons" type="radio" value="1"><br>
                    Not really<input  name="radio-buttons" type="radio" value="2"><br>
                    No<input  name="radio-buttons" type="radio" value="3">
                    <div>
                        <h4>What should we improve?:</h4>
                        Delivery Time<input type="checkbox" name="checkbox" value="1"><br>
                        Delivery Fee<input type="checkbox" name="checkbox" value="2"><br>
                        Others(Pls state in the comment section below)<input type="checkbox" name="checkbox" value="3">
                    </div>
                    <div id="textarea">
                        <textarea name="comment" id="" cols="30" rows="5" placeholder="comment..."></textarea>
                        <div>
                        <button id="submit">Submit</button>
                        </div>
                        <p>&copy;2019</p>
                    </div>
                </div>
            </form>
            <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
        </body>
    </main>
</html>

              
            
!

CSS

              
                html{
   margin: 0px;
   padding: 0px;
}

main{
    padding: 10px;
}

body{
    font-size: 16px;
    background-color: aliceblue;
    margin: 0px;
    padding: 10px 10px 0px 10px;
}

h1{
    text-align: center;
}

#description{
    text-align: center;
}

label{
    font-weight: bold;
    font-size: 17px;
}

input[type=text], [type=email], [type=number]{
    width: 200px;
    height: 25px;
}

#top-center{
   text-align: center;
   display: inline;
}

input{
    border-radius: 5px;
}

textarea{
    border-radius: 10px;
}

button{
   border-radius: 10px;
   background-color: blue;
   color: whitesmoke;
   width:100px;
   height: 30px;
}

#textarea{
    text-align: center;
}

#selections{
    font-stretch: expanded;
    font-size: 22px;
}

button:hover{
    background-color: red;
}

@media (max-width: 768px){
    
    input{
        text-align: center;
        display: block;
    } 

    label{
        text-align: center;
    }

    input[type=text], [type=email], [type=number]{
        width: 320px;
       
    }
}

              
            
!

JS

              
                
              
            
!
999px

Console