css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

            
              <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
<h1 id='title'>Works of Tolkien Survey</h1>
<form id='survey-form'>
  <div class='container'>
    <div class="header">
      <p id="description">Share your Tolkien Works experience</p>
    </div>
    <label class="question" id='name-label'>* Name:</label>
    <input class="answer" id='name' name='name' for='name' placeholder='Enter your name' required></input>
    <label class="question" id='email-label'>* Email:</label>
    <input class="answer" id='email' name='email' for='email' type='email' placeholder='Enter your Email' required></input>
    <label class="question" id='number-label'>How many Tolkien Books have you read?</label>
    <input class="answer" id='number' type='number' name='number' for='number of books' min='1' max='100' placeholder='Enter how many Tolkien books you have read.'></input>
    <label class="question">What is your favorite of the following  books?</label>
    <select class="answer" id='dropdown' name='favorite' for='favorite'>
      <option value="blank" disabled selected>Select a book</option>
      <option value="1">The Hobbit</option>
      <option value="2">The Lord of the Rings</option>
      <option value="3">The Silmarillion</option>
      <option value="4">Beren and Luthien</option>
      <option value="5">The Children of Hurin</option>
      <option value="6">The Fall of Gondolin</option>
    </select>
<label class="question">How experienced would you say you are with the works of Tolkien?</label>
    <div class='answer'>
      <label>
      <input type="radio" name="experience" for='experience' value='1'>Very Experienced</input>
      </label>
      <label>
        <input type="radio" name="experience" for='experience' value='2'>Experienced</input>
      </label>
      <label>
        <input type="radio" name="experience" for='experience' value='3'>Medium Experience</input>
      </label>
      <label>
        <input type="radio" name="experience" for='experience' value='4'>Not Experienced</input>
      </label>
      <label>
        <input type="radio" name="experience" for='experience' value='5'>Very Inexperienced</input>
      </label>
    </div>
    <label class="question">Which Tolkien Quotes have you read in their original source?</label>
      <div class='answer'>
        <label>
          <input type="checkbox" name="quote" for='quote' value='1'>Not all those who wander are lost.</input>
        </label>
        <label>
          <input type="checkbox" name="quote" for='quote' value='2'>All we have to decide is what to do with the time that is given to us.</input>
        </label>
        <label>
          <input type="checkbox" name="quote" for='quote' value='3'>If more of us valued food and cheer and song above hoarded gold, it would be a merrier world.</input>
        </label>
        <label>
          <input type="checkbox" name="quote" for='quote' value='4'>It's a dangerous business going out your front door.</input>
        </label>
        <label>
          <input type="checkbox" name="quote" for='quote' value='5'>Faithless is he that says farewell when the road darkens.</input>
        </label>
      </div>
    <label class="question">If I forgot a book that you would like included in this survey, or have any additional comments, please put them here:</label>
    <textarea class="answer" name='details' for='details'></textarea>
    <div class="footer">
      <button id="submit">Submit</button>
    </div>
  </div>
</form>
            
          
!
            
              @import url('https://fonts.googleapis.com/css?family=Open+Sans');

body {
  text-align: center;
  background-color: #a2c3f9;
  font-family: "Open Sans";
}

.header, .footer {
  font-size: 1.1em;
  grid-column-start: 1;
  grid-column-end: 3;
}

.question {
  text-align: right;
  justify-self: end;
  align-self: start;
}

.answer {
  text-align: left;
  justify-self: start;
  align-self: start;
  width: 80%
}

.container {
  border-radius: 7px;
  min-height: 800px;
  max-width: 800px;
  min-width: 400px;
  width: 50%;
  background: white;
  display: grid;
  margin: auto;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(8, auto);
  grid-column-gap: 20px;
  grid-row-gap: 10px;
  padding: 5px 40px 5px 40px;
}

label {
  display: block;
  padding: 6px;
}
            
          
!
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.
Loading ..................

Console