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

              
                <h1 id="title">Survey Form</h1>
<div id="outer">
  <p id="description">How do you eat your steak?</p>
  <form id="survey-form" method="GET" action="#">
    <div class="question">
      <div class="onTheLeft">
        <label id="name-label" for="name">*Name : </label>
      </div>
      <!--left-->
      <div class="onTheRight">
        <input id="name" type="text" name="name" class="input-box" placeholder=" Enter your name" autofocus required>
      </div>
      <!--right-->
    </div>
    <!--question-->
    <div class="question">
      <div class="onTheLeft">
        <label id="email-label" for="email">*Email : </label>
      </div>
      <!--left-->
      <div class="onTheRight">
        <input id="email" type="email" name="email" class="input-box" placeholder=" Enter your email" required>
      </div>
      <!--right-->
    </div>
    <!--question-->
    <div class="question">
      <div class="onTheLeft">
        <label id="number-label" for="age">*Age : </label>
      </div>
      <!--left-->
      <div class="onTheRight">
        <input id="number" min="0" max="125" type="number" name="age" class="input-box" placeholder=" Enter your age">
      </div>
      <!--right-->
    </div>
    <!--question-->
    <div class="question">
      <div class="onTheLeft">
        <label for="dropdown">
          Which option best describes your love for steak?
        </label>
      </div>
      <!--left-->
      <div class="onTheRight">
        <select id="dropdown" name="loveForSteak">
          <option disabled selected>Pick one</option>
          <option value="love">I love steeeaaak!!!</option>
          <option value="like">I like it.</option>
          <option value="okay">It is okay.</option>
          <option value="hate">I hate steak.</option>
          <option value="don't know">I don't know.</option>
        </select>
      </div>
      <!--right-->
    </div>
    <!--question-->
    <div class="question">
      <div class="onTheLeft">
        <label for="cook">How would you like your steak?</label>
      </div>
      <!--left-->
      <div class="onTheRight">
        <ul id="cook">
          <li><input name="radio-button" type="radio" value="1">Blue</input>
          </li>
          <li><input name="radio-button" type="radio" value="2">Rare</input>
          </li>
          <li><input name="radio-button" type="radio" value="3">Medium</input>
          </li>
          <li><input name="radio-button" type="radio" value="4">Well done</input>
          </li>
        </ul>
      </div>
      <!--right-->
    </div>
    <!--question-->
    <div class="question">
      <div class="onTheLeft">
        <label for="side-dish">Which side dish do you prefer?</label>
      </div>
      <!--left-->
      <div class="onTheRight">
        <ul id="side-dish">
          <li>
            <input name="sideDish" type="checkbox" value="1">French Fries</input>
          </li>
          <li>
            <input name="sideDish" type="checkbox" value="2">Grilled Parmesan Broccoli</input>
          </li>
          <li>
            <input name="sideDish" type="checkbox" value="3">Grilled Zucchini Salad</input>
          </li>
          <li>
            <input name="sideDish" type="checkbox" value="4">Tangy Carrot Slaw</input>
          </li>
          <li>
            <input name="sideDish" type="checkbox" value="4">Herbed Smashed Cucumbers</input>
          </li>
        </ul>
      </div>
      <!--right-->
    </div>
    <!--question-->
    <div class="question">
      <div class="onTheLeft">
        <label for="comment">Any comment?</label>
      </div>
      <!--left-->
      <div class="onTheRight">
        <textarea cols="50" rows="30" id="comment" name="comment" placeholder="Enter your comment here..."></textarea>
      </div>
      <!--right-->
    </div>
    <!--question-->
    <div class="submit"><button id="submit" type="submit">Submit</button></div>
  </form>
</div>
<!--outer-->
<!-- fcc test runner
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
-->
              
            
!

CSS

              
                /*
COLUMBIA BLUE #CCE0E1
CINEREOUS #9C8A7C
GAINSBORO #E3DFDB
PEWTER BLUE #8DB4BD
MING #3C7480
*/
@import url("https://fonts.googleapis.com/css?family=Playfair+Display");
body {
  font-family: "Playfair Display", serif;
  background-color: #e3dfdb;
  min-width: 330px;
}
h1 {
  background-color: #3c7480;
  padding: 0.5em;
  text-align: center;
  font-size: 2em;
  border-radius: 4px;
  margin: 1em auto;
  max-width: 60vw;
}
#outer {
  margin: 2em auto;
  max-width: 60vw;
  padding: 1em;
  background-color: #cce0e1;
  border-radius: 4px;
}
#description {
  background-color: #8db4bd;
  text-align: center;
  padding: 0.5em;
  font-size: 1.5em;
  border-radius: 4px;
}
.question,
.submit {
  text-align: center;
  padding: 0.4em;
}
.onTheLeft {
  display: inline-block;
  text-align: right;
  vertical-align: top;
  width: 50%;
}
.onTheRight {
  display: inline-block;
  text-align: left;
  vertical-align: middle;
  width: 40%;
  padding-left: 10px;
  margin-right: 20px;
}
.input-box,
#dropdown {
  height: 30px;
  width: 150px;
  border: 1px solid #3c7480;
  border-radius: 2px;
}
ul {
  list-style: none;
}
li {
  position: relative;
  left: -43px;
  bottom: 15px;
  margin-bottom: 3px;
}
textarea {
  height: 50px;
  width: 100%;
  border: 1px solid #3c7480;
  border-radius: 2px;
}
#submit {
  background-color: #9c8a7c;
  border-radius: 4px;
  color: white;
  font-size: 1em;
  height: 40px;
  width: 96px;
  margin: auto;
  border: 0px solid;
}
@media screen and (max-width: 1180px) {
  .onTheLeft,
  .onTheRight {
    width: 100%;
    text-align: left;
  }
  .input-box,
  #dropdown {
    width: 100%;
    margin-top: 10px;
  }
  textarea {
    margin-top: 10px;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console