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.

            
              <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>

<header class="box-title">
<h1 id="title">Survey Form</h1>

<p id="description">In this form we will ask you about your learning habits.</p>
  </header> <br>

<form id="survey-form">
 <label for="name" id="name-label">Name*</label>
  <input  id="name" type="name" required placeholder="Enter your full name"><br><br>
  
  <label for="email" id="email-label">E-mail address*</label>
  <input id="email" type="email" required placeholder="Enter your E-mail address"><br><br>
  
  <label for="age" id="number-label">Age*</label>
  <input id="number" type="number" min="0" max="100" required placeholder="Enter your age"><br><br>
  
  <label for="occupation">Which option best describes your current role?</label>
  
  <select id="dropdown" name="occupation">
    <p/> <option value="student">student</option>
  <option value="full time employee">full time employee</option>
  <option value="part time employee">part time employee</option>
  <option value="full time learner">full time learner</option>
  <option value="part time learner">full time learner</option>
  <option value="freelancer">freelancer</option>
    <option value="other">other</option>
</select></p><br><br>
  
  <label for="yes-no" name="yes-no">Have you ever completed an online course?</label>
  <p/><label class="radio">
    <input type="radio" name="yes-no" value="1">yes</label></p>
  <p><label class="radio">
    <input type="radio" name="yes-no" value="2">no</label></p>
  <br><br>
 
  <div class="container">
    <div><label for="media" id="media" class="question">Through which media do you learn the best?</label></div>
    <div class="reading"><label for="media"><input id="media" type="checkbox" name="type-of-media" value="1" >reading</label></div>
  <div class="video"><label for="media"><input id="media" type="checkbox" name="type-of-media" value="1">watching videos</label></div>
  <div class="listening"><label for="media" ><input id="media" type="checkbox" name="type-of-media" value="1">listening to podcasts or other audio content</label></div>
  <div class="Internet"><label for="media"><input id="media" type="checkbox" name="type-of-media" value="1">researching accross the Internet</label></div>
  <div class="other"><label for="media"><input id="media" type="checkbox" name="type-of-media" value="1">other</label></div>
    
    </div>
  <br><br>

  
  <label for="comments">Anything you would like to add? 
  <textarea rows="4" cols="60">
Please type your comments, additional thoughts here. 
</textarea><br><br>
  
    
    <button class="button" id="submit" type="submit">Submit</button>
</form>

            
          
!
            
              body {
  font-family: 'Source Sans Pro', sans-serif;
  margin-left: 300px;
  margin-right: 300px;
}

.box-title {
 width: 860px;
 border: 2px solid black;
 margin-right: 100px;
 margin-left: 140px; 
 background: #fded08;
}

h1 {
  font-family: 'Fjalla One', sans-serif;
  font-size: 40px;
  margin-bottom: 0px;
  text-align: center;
}

p {
  text-align: center;
}

#description {
  font-weight: bold;
  margin-top: 10px;
  margin-bottom: 60px
}

#survey-form {
  text-align: center;
  border: dashed;
  border-width: 2px;
  height: auto;
  width: 800px;
  padding: 30px;
  margin-right: 100px;
  margin-left: 140px;
}
   
  .question {
    grid-area: question;
  }
  
  .reading {
    grid-area: reading;
  }
  
  .video {
   grid-area: video
  }
  
  .listening {
    grid-area: listening;
    }

.Internet {
  grid-area: Internet;
}

.other {
  grid-area: other;
}

.container {
  display: grid;
  width: 100%;
  grid-template-columns: 400 400px;
  grid-template-rows: 20px 20px 20px 20px 20px;
  grid-row-gap: 15px;
  and grid-column-gap: 40px;
  grid-template-areas:
     "question reading"
     ". video"
     ". listening"
     ". Internet"
     ". other"
}

input {
  width: 30%;
  border: 1px solid grey;
  border-radius: 3px;
  padding: 3px 0px 3px 5px;
}


.button {
  background-color: #fded08;
  font-weight: bold;
  font-size: 14px;
  border: solid;
  border-width: 2px;
  margin: 30px 20px 30px 20px;
  padding-top: 10px;
  padding-right: 50px;
  padding-left: 50px;
  padding-bottom: 10px; 
}



            
          
!
            
              // !! IMPORTANT README:

// You may add additional external JS and CSS as needed to complete the project, however the current external resource MUST remain in place for the tests to work. BABEL must also be left in place. 

/***********
INSTRUCTIONS:
  - Select the project you would 
    like to complete from the dropdown 
    menu.
  - Click the "RUN TESTS" button to
    run the tests against the blank 
    pen.
  - Click the "TESTS" button to see 
    the individual test cases. 
    (should all be failing at first)
  - Start coding! As you fulfill each
    test case, you will see them go   
    from red to green.
  - As you start to build out your 
    project, when tests are failing, 
    you should get helpful errors 
    along the way!
    ************/

// PLEASE NOTE: Adding global style rules using the * selector, or by adding rules to body {..} or html {..}, or to all elements within body or html, i.e. h1 {..}, has the potential to pollute the test suite's CSS. Try adding: * { color: red }, for a quick example!

// Once you have read the above messages, you can delete all comments. 

            
          
!
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