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 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

              
                <div class="container">
  <header class="header">
    <h1 id="title"> Customer satisfaction survey form</h1>
    <p id="description">This survey aims to improve the service quality of our store. Thank you for your time. </p> 
  </header>
  <form id="survey-form">
    <div class="form-group">
      <label id="name-label"for="name">Name</label>
      <input
        type="text"
        name="name"
        id="name"
        class="form-control"
        placeholder="Enter your name"
        required
      />
    </div>
    <div class= "form-group">
                          <label id="email-label" for="email">Email</label>
                          <input type="email" name="email" id="email" class="form-control" placeholder="Enter email" required/>
                                                                                                                   </div>
<div class="form-group">
                       <label id="number-label" for="number">Age</label>
             <input type="number" name="age" min="18" max="99" id="number" class="form-control" placeholder="Enter age" required/>
   </div>
        <div class="form-group">
                               <p> How do you buy in our shops?</p>
       <select id="dropdown" name="role" class="form-control" required>
        <option disabled selected value>Select </option>
           <option value="online">Online</option>
                                 <option value="stationary"> Stationary </option>
                                                           </select>
                                                           </div>
                
        <div class="form-group">
                               <p> What kind of products you shop the most?</p>
                        <select id="dropdown" name="role" class="form-control" required>
                               <option disabled selected value>Select</option>
                               <option value="cosmetics">Cosmetics</option>
                                                        <option value="clothes"> Clothes</option>
                                                                               </select>
                                                                               
                               </div>   
       <div class="form-group">
                              <p> How do you rate shopping in our store ?</p>
       <label>  <input name="shopping-rate" value="excellent" type="radio"  class="input-radio"checked/> Excellent</label> 
       <label> <input name="shopping-rate" value="good" type="radio" class="input-radio"/> Good </label>  
       <label> <input name="shopping-rate" value="poor" type="radio" class="input-radio"/> Poor </label>
                                                           
        </div>
         <div class="form-group">
                                <p> What would you like us to improve?</p>
           <label> <input name="improve" value="variety of goods" type="checkbox" class="input-checkbox" checked/> Variety of goods</label>
          <label> <input name="improve" value="order delivery" type="checkbox" class="input-checkbox"/> Order delivery</label>
          <label> <input name="improve" value="customer service contact" type="checkbox" class="input-checkbox"/> Customer service contact</label>
                          </div>
           <div class="form-group">
                                  <p> Feel free to write any suggestions or comment </p>
                             <textarea id="comments" class="input-textarea" name="comment" placeholder="Enter here..."></textarea>
                                  
                                  </div>    
    <div class="form-group">
                                  <button type="submit" id="submit" class="submit-button"> Submit </button>
                                                                                         </div>
  </form>
  
  
  
</div>
<footer> &copy MagWebDev</footer>
<script src='https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js'></script>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin-top: 30px;
  background: url("https://i.postimg.cc/VkwbkFRD/shopping-4000414-1280.jpg") no-repeat center center fixed;
  background-size: cover;
  font-size: 20px;
  font-family: 'Roboto', sans-serif;
  line-height: 1.7em;
  
 
  }

.header {
  margin: 0 auto;
  text-align: center;
  padding-top: 50px;
  
}
.container {
  width: 100%;

    background-color: rgba(255, 255, 255, 0.8);
  
}
#description {
  padding: 15px 0; 
  
  font-style: italic;
  font-size: 18px;
}
form {
  width: 100%;
  height: 100%;

  

}

.container {
  width: 800px;
  
  
 
  align-items: center;
  margin: 0 auto;
}  
form .form-group {
  display: flex;
  flex-direction: column;
  margin: 0 40px;
  padding-top: 10px;
}

.form-control {
  height: 30px;
  padding-left: 10px;
  font-size: 18px;
}
  
#dropdown {
  font-size: 18px;
}
 .input-textarea {
   margin-top: 10px;
    height: 150px;
  }
  button {
    margin-top: 20px;
    height: 30px;
    border-radius: 5px;
    background-color: #fff;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 20px;
    background-color: #f72585;
  }
 footer {
  text-align: center;
  background-color: #000;
  color:white;
  padding: 0.5em;
}
@media (max-width: 768px) {
  
  body {
    font-size: 16px;
  }
  .container {
    max-width: 380px;
  
  }
  #description {
    font-size: 16px;
  }
  

}
 
              
            
!

JS

              
                
              
            
!
999px

Console