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

              
                <!DOCTYPE html>
<html>
  <head>
    <title>Survey Form Page</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="styles.css">
    <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>

  </head>
  
<!--  title/description  -->
  <body>
    <h1 id=title>Survey Form</h1>
    <div id="main-container">
    <div>
      <p id="description">We'd like to hear your feedback on your stay!</p>
    </div>
    <form id="survey-form" method="GET" action="https://en.wikipedia.org/wiki/Turtle"> 
<!--    end    -->
      
<!--   name     -->
      <div class="mainBox">
        <div id="nameLabel" class="labelClass" >
          <label for="name" id="name-label" >Name:</label>       
        </div>
        <div class="rightTab">
          <input type="text" id="name" class="input" placeholder="Enter your name" required>
        </div>
      </div>        
<!--    end    -->
      
<!--    email    -->
      <div class="mainBox">
        <div id="emailLabel" class="labelClass">
          <label for="email" id="email-label">Email:</label>
        </div>
        <div class="rightTab">
          <input id="email" class="input" type="email" placeholder="Enter your email" required>
        </div>
      </div>
<!--    end    -->
      
<!--    age    -->
<div class="mainBox">
        <div id="age" class="labelClass">
          <label for="age" id="number-label">Age:</label>
        </div>
        <div class="rightTab">
          <input id="number" class="input" type="number" min="1" max="100" placeholder="Enter your age" required>
        </div>
      </div>
<!--    end    -->
      
<!--   stay     -->
      <div class="mainBox">
        <div id="stay" class="labelClass">
          <label for="stay">What option best describes your stay?</label>
        </div>
        <div id="dropdown" class="rightTab">
          <select class="input">
            <option value="select">Select one</option>
            <option value="great">IT WAS GREAT </option>
            <option value="okay">IT WAS OKAY!</option>
            <option value="bad">IT WAS A BAD!</option>
          </select>
        </div>
      </div>
<!--   end       -->
      
<!--    recommend    -->
      <div class="mainBox">
        <div id="recommend1" class="labelClass">
          <label id="recommend2"for="recommendation">How likely is that you would recommend Turtle Resort?</label>
        </div>
          <div id="radioBtn" class="rightTab radioBtn">
            <input type="radio" name="recommend" value="yes"> Definitely</br>
            <input type="radio" name="recommend" value="maybe"> Maybe</br>
        <input type="radio" name="recommend" value="no"> Never</br>
          </div>
      </div>
<!--    end    -->
  
<!--  improvements  -->
  <div class="mainBox">
    <div id="checkLabel" class="labelClass">
      <p id="para" for="improvements">Things that should be improved in the future (Check all that apply):</p>
    </div>
      <div id="checkbox" class="rightTab">
        <label><input type="checkbox" name="improvements" value="parking"> Parking</label>
        <label><input type="checkbox" name="improvements" value="bathrooms"> Bathrooms</label>
        <label><input type="checkbox" name="improvements" value="amenities"> Amenities</label>
        <label><input type="checkbox" name="improvements" value="wifi"> Faster Wi-Fi
        <label><input type="checkbox" name="improvements" value="Accommodations"> Accommodations</label>
        <label><input type="checkbox" name="improvements" value="housekeeping"> Daily Housekeeping</label>
        <label><input type="checkbox" name="improvements" value="furniture"> Furniture and Linens</label>
        <label><input type="checkbox" name="improvements" value="checkin&out"> Rolling Check-in/out</label>
       <label><input type="checkbox" name="improvements" value="cs"> 24/7 Customer Service</label>
       <label><input type="checkbox" name="improvements" value="planning"> Hotel Planning & Bookings</label>
     </div>
</div>
<!--  end  -->
    
<!--   comments   -->
  <div class="mainBox">
    <div id="textLabel" class="labelClass">
      <p id="comments" for="feedback">Any Comments or Suggestions?</p>
    </div>
      <div id="textarea" class="rightTab">
        <textarea rows="5" cols="40" placeholder="Enter your comments here..." required></textarea>
     </div>
<!--   end   -->
    
<!--  submit    -->
    <div id="submitBtn">
      <input id="submit" type="submit" value="Submit">
    </div>
<!--   end   -->
      </form>
  </div>
  </body>
</html>
              
            
!

CSS

              
                * {
  margin: 0;
  padding: 0;
}

body, html {
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  background-image: url('https://images.pexels.com/photos/1167021/pexels-photo-1167021.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940');
  background-size: cover;
}

#title {
  padding-top: 30px;
}

#main-container {
  width: 750px;
  height: 860px;
  margin: 30px auto; 
  background-color: #fff;
  font-weight: 500;
  border-radius: 5px 5px;
  opacity: 0.9;
}

#description {
  padding-bottom: 15px;
  padding-top: 30px;
}

.mainBox {
  display: flex;
  margin: 15px auto;
  padding: 2.2px;
  padding-right: 30px;
  float: right;
}

.labelClass {  
}

#nameLabel, #emailLabel, #age {
  padding-right: 30px;
}

#stay {
  padding-right: 15px;
  width: 320px;
}

#dropdown {
  padding-right: 216px;
   
}

.rightTab {
  padding-right: 30px;
}

#name, #email, #number, #radioBtn {
  width: 300px;
}

#recommend2 {
  padding-right: 20px;
  text-align: right;
}

#radioBtn {
  cursor: pointer;
  height: 70px;
  text-align: left;
}

.radioBtn {
  padding-right: 80px;
  margin: 0 10px 0 10px; 
}

label {
  display: block;
  text-align: left;
  padding-bottom: 5px;
}

#para {
  text-align: right;
  width: 300px;
  padding-right: 29px;
  position: relative;
  bottom: 20px;
}

#checkbox {
  width: 300px;
  padding-right: 32px;
  position: relative;
  bottom: 20px;
}

#textarea {
  width: 200px;
  position: relative;
  bottom: 30px;
  padding-right: 25px;
} 

#comments {
  padding-right: 30px;
  position: relative;
  bottom: 30px;
}

#submitBtn {
  position: relative;
  right: 280px;
  bottom: -80px;
    }

#submit:hover {
  background-color: #266084;
}

#submit {
  font-size: 1em;
  border-radius: 3px;
  background-color: #59ace0;
  color: #fff;
  height: 40px;
  width: 96px;
  margin: 5px;
  border: 0px solid;

}

::-webkit-input-placeholder {
  padding: 5px;
}  

              
            
!

JS

              
                // coded by @SamAI-Software
const projectName = 'survey-form';
localStorage.setItem('example_project', 'Survey Form');
              
            
!
999px

Console