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

              
                <head>
  <title>Survey Form</title>
  

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

</head>

<body>
  <div id="container">
    <form id="survey-form">

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

      <label for="email" id="email-label">
        <p class="input-titles">Email</p>
        <input id="email" type="email" name="email" placeholder="Enter your email" required>
      </label>

      <label for="number" id="number-label">
        <p class="input-titles">Age</p>
        <input id="number" type="number" name="age" min="10" max="99" placeholder="Enter your age" required>
      </label>

      <div id="dropdown">
        <p class="input-titles">How often do you use our platform?</p>
        <select class="dropdown-menu" name="frequence" required>
          <option disabled selected value>Select one of the options</option>
          <option value="year">Couple times a year</option>
          <option value="month">Couple times a month</option>
          <option value="week">Couple times a week</option>
          <option value="daily">Daily</option>
        </select>
      </div>

      <div id="radio-group">
        <p class="input-titles">Would you recommend our services to a friend?</p>
        <label for="recommend-1">
          <input id="recommend-1" type="radio" name="recommend" value="definitely" class="radio-btns" checked>Definitely
        </label>

        <label for="recommend-2">
          <input id="recommend-2" type="radio" name="recommend" value="maybe" class="radio-btns">Maybe
        </label>

        <label for="recommend-3">
          <input id="recommend-3" type="radio" name="recommend" value="not sure" class="radio-btns">Not sure
        </label>

      </div>

      <div id="checkbox-list">
        <p class="input-titles">How did you heard about us? (Check all that apply)</p>

        <label for="checkbox-1">
          <input class="input-checkbox" type="checkbox" name="heard-about-us" value="google-ad" id="checkbox-1">Google Ad
        </label>

        <label for="checkbox-2">
          <input class="input-checkbox" type="checkbox" name="heard-about-us" value="search-engine" id="checkbox-2">Search engine
        </label for="checkbox-">

        <label for="checkbox-3">
          <input class="input-checkbox" type="checkbox" name="heard-about-us" value="social-media" id="checkbox-3">Social media
        </label for="checkbox-">

        <label for="checkbox-4">
          <input class="input-checkbox" type="checkbox" name="heard-about-us" value="email" id="checkbox-4">Email
        </label for="checkbox-">

        <label for="checkbox-5">
          <input class="input-checkbox" type="checkbox" name="heard-about-us" value="newspaper" id="checkbox-5">Newspaper

          <label for="checkbox-6">
            <input class="input-checkbox" type="checkbox" name="heard-about-us" value="tv" id="checkbox-6">TV
          </label>

          <label for="checkbox-7">
            <input class="input-checkbox" type="checkbox" name="heard-about-us" value="other" id="checkbox-7">Other
          </label>

      </div>

      <label for="comments" class="input-titles">Any comments or suggestions?</label>
      <textarea id="comments" name="comment" class="comment-section" placeholder="Enter your comment here..."></textarea>

      <div>
        <button id="submit" type="submit">Submit</button>

      </div>

    </form>

    <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"> </script>
  </div>
</body>
              
            
!

CSS

              
                html{
    box-sizing:border-box;
    font-size: 16px;
    margin:0;
    padding:0;
    background: #D9D5D2;
}

body{
    font-size: 1rem;
    font-family:sans-serif;
    color: #F1F0F2;
}

p{
    font-weight: 600;
}
#container{

background: #3F3F40;
box-sizing: border-box;
padding: 2rem;
border-radius: 0.25rem;
margin: 2rem auto 1rem;
width: 100%;
}

#title{
text-align: center;
color: #3F3F40;
}
 
#description{
     text-align: center;
    color: #3F3F40;
 }


 .input-titles{
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}
 
 #input-title-name{
     margin-bottom: 0.5rem;
 }
 
 label{
    display: block;
 }

 #name, #email, #number{
    border: none;
    box-sizing: border-box;
    width: 100%;
    height: 2.25rem;
    padding-left: 0.5rem;
    border-radius: 0.15rem;
}

.dropdown-menu{
    display: block;
  width: 100%;
  height: 2.5rem;
  padding: 0.50rem;
  color: #495057;
  background-color: #F1F0F2;
  background-clip: padding-box;
  border: none;
  border-radius: 0.15rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.radio-btns, .input-checkbox{
    margin: 0.5rem;
    border: none;
    accent-color: #088C37;
}

#comments{
    display: inline;
    box-sizing: border-box;
    border: none;
    border-radius: 00.15rem;
    width: 100%;
    height: 6rem;
    padding: 0.50rem;
    resize: vertical;
}

#submit{
    background-color: #088C37;
    color:white;
    font-size: 1.25rem;
    font-weight: 400;
    padding: 0.25rem;
    border: none;
    width: 100%;
    height: 3rem;
    margin-top: 1.5rem;
    transition:all .25s ease-in;
}

#submit:hover{
    background-color: #0BB345;
    
    
}

@media (max-width:576px){
    #container{
        width: 100%;
        padding: 1rem 1rem 2rem;
    }
}

@media (min-width:577px){
    #container{
        width: 70%;
    }
}
              
            
!

JS

              
                
              
            
!
999px

Console