123

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="Join our weekly newsletter">
    <meta name="author" content="Emily Vogel">

    <title>FreeCodeCamp Responsive Web Design Project - Build a Survey Form</title>

  </head>

  <body>
      <h1 id="title">Check your health status!</h1>
    <form id="survey-form">
      <p id="description">Fill out the questionaire below to evaluate your current health status.</p>
      <div class="labels">
        <label for="name" id="name-label" placeholder="Name" required>Name:</label>
      </div>
        <div class="right-side">
          <input type="text" id="name" placeholder="Name" required>
        </div>
       
      <div class="labels">
        <label for="email" id="email-label">Email:</label>
      </div>
        <div class="right-side">
          <input type="email" id="email" placeholder="Email address" required>
        </div>
        
      <div class="labels">
        <label for="number" id="number-label">Enter your approximate weight:</label>
      </div>
        <div class="right-side">
          <input type="number" id="number" placeholder="Pounds" min="0" max="999"required>
        </div>
       
      <div class="labels">
        <label for="dropdown" id="dropdown">How often do you exercise?</label>
      </div>
      <div class="right-side">
        <select name="Frequency" id="dropdown">
          <option value="5-7 days per week">5-7 days per week</option>
          <option value="3-4 days per week">3-4 days per week</option>
          <option value="1-2 days per week">1-2 days per week</option>
          <option value="Less than 1 day per week">Less than 1 day per week</option>
        </select>
      </div>
        
    <div class="labels">
      <p>Generally speaking, how confident do you feel?</p>
    </div>
    <div class="right-side">
      <div class="hang-right">
        <ul style="list-style: none;">
          <li>
            <label for="very-confident"> 
              <input id="very-confident" type="radio" name="confidence"> Very Confident</label>
          </li>
          <li>
            <label for="somewhat-confident"> 
              <input id="somewhat-confident" type="radio" name="confidence"> Somewhat Confident </label>
          </li>
          <li>
            <label for="not-so-confident"> 
              <input id="not-so-confident" type="radio" name="confidence"> Not so Confident 
            </label>
          </li>
        </ul>
      </div> <!--right-side-->
    </div> <!--hang-right-->
    <div class="labels">
      <p>Which of these do you eat on a daily basis?</p>
    </div>
    <div class="right-side">
      <ul style="list-style: none;">
        <li>
          <label for="fruit">
            <input id="fruit" type="checkbox" name="food" value="1"> Fruit</label>
        </li>
        <li>
          <label for="veggies">
            <input id="veggies" type="checkbox" name="food" value="2"> Vegetables</label>
        </li>
        <li>
          <label for="grains">
            <input id="grains" type="checkbox" name="food" value="3"> Whole Grains</label>
        </li>
        <li>
          <label for="protein">
            <input id="protein" type="checkbox" name="food" value="4"> Lean Protein</label>
        </li>
        <li>
          <label for="fats">
            <input id="fats" type="checkbox" name="food" value="5"> Healthy fats</label>
        </li>
        <li>
          <label for="junk">
            <input id="junk" type="checkbox" name="food" value="6"> Junk food</label>
        </li>
      </ul>
    </div>
    
    <div class="labels">
      <label for="thoughts">Do you have any other thoughts about your health that you'd like to add?</label>
    </div>
      <div class="right-side">
        <textarea id="thoughts" name="thoughts"
                  rows="3" cols="33" maxlength="200"
                  wrap="hard">Add any of your health comments or concerns here.
        </textarea>
      </div>
      <br></br>
      <button id="submit" type="submit">Submit</button>
      
      <p id="copyright">&copy; 2018</p>
    </form>
  </body>
</html>
            
          
!
            
              body {
  text-align: center;
  background-color: #a4c6fc;
}

form {
  width: 65%;
  max-width: 900px;
  margin: 0 auto;
  background-color: #dbe8fc;
  border-radius: 10px;
  padding: 20px;
}

.labels {
  display: inline-block;
  text-align: right;
  width: 40%;
  margin-right: 5px;
  vertical-align: top;
  padding: 5px;
}

.right-side {
  display: inline-block;
  text-align: left;
  width: 40%;
  margin-left: 5px;
}

button {
  font-size: 1em;
  height: 40px;
  width: 96px;
  margin: 10px;
  margin-top: 20px;
  border-radius: 5px;
}

li {
  margin-left: -3em;
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console