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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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
</h1>
<div>
  <p id="description">Dear colleagues, we are conducting this survey to better understand the academic interests of people in our community. Please fill out this form, it will take you a few minutes. </p>
</div>
<div class="form">
  <form id="survey-form">
    <div>
    <label for="name" id="name-label">Name:</label>
    <input class="input-field" type= "text" id="name" name="name" placeholder="your name" required>
    
    <p> <label for="email" id="email-label">Email:</label>
    <input class="input-field" type="email" id="email" name="email" placeholder="your email" required> </p>
    </div>
      <p>
    <label for="number" id="number-label">How many mangas do you read per year?</label>
    <input class="input-field" type="number" value="0" min="0" max="4000" id="number" name="number" placeholder="number" required>
    </p>
    <label for="dropdown">How many times do you read the same manga?
    </label>
    <select class="input-field" id="dropdown">
  <option value="1">1</option>
  <option value="2">2</option>
  <option value="3">3</option>
  <option value="4">4</option>
</select>
    
    <div>
      <p>What genre do you prefer?</p>
      
      <input  id="radio1" type="radio" value="Shonen" name="1 or 2 or 3">
      <label for="radio1">Shonen</label>
      
       <input id="radio2" type="radio" value="Seinen" name="1 or 2 or 3">
      <label for="radio2">Seinen</label>
<input id="radio3" type="radio" value="Shojo" name="1 or 2 or 3">
      <label for="radio3">Josei</label>
    </div>
    
    
    <fieldset id = "check-boxes">
      
      <legend>What is your favorite subject?</legend>
      
      
      <input id="check1" type="checkbox" value="Action" name="check">
       <label for="check1">Action</label> 
      

      
      <input id="check2" type="checkbox" value="Drama" name="check">
      <label for="check2">Drama</label> 
      
      
      <input id="check3" type="checkbox" value="Romance" name="check">
      <label for="check3">Romance</label>
      
      
      <input id="check4" type="checkbox" value="Fantasy" name="check">
      <label for="check4">Fantasy</label>
      
      
      
      <input id="check5" type="checkbox" value="Sport" name="check">
      <label for="check5">Sport</label>
    
      
    </fieldset>
    
    <label for="textarea">Please leave a comment here if any:</label>
    <p>
    <textarea id="textarea" name="textarea"  rows="3" cols="80">
    </textarea>
    </p>
      <button type="submit" id="submit">submit
      </button>
  </form>
</div>
              
            
!

CSS

              
                body {
  background-color: lightblue;
}
h1{
  text-align: center;
  color: black;
}

#description{
  text-align: justify;
  font-size: 20px;
  font-family: sans-serif;
  padding: 0 10px 0 10px;
}
#name{
  margin-bottom: 30px;
}
#number{
  margin-bottom: 30px;
}
#dropdown{
  margin-bottom: 30px;
  
}
[type='radio']{
  
  margin-bottom: 30px;
   width: 25px;
  height: 25px;
  
  
}
[type='checkbox']{
  margin-bottom: 30px; 
  width: 25px;
  height: 25px;
}

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

#submit{
  
  margin-bottom: 30px;
  width: auto;
  height: auto;
  background-color: white;
  font-size: 24px;
  
  border: 2px solid black;
}

#survey-form{ 
  text-align: center;  
  width: auto;
  height: auto;
  vertical-align: middle;
  font-size: 20px;
  font-family: serif;
} 
.input-field{
  width: auto;
  height: auto;
  font-size: 20px;
  font-family: serif;
}

#textarea {
  max-width: 100%;
  width: 50%;
  font-size: 20px;
  line-height: 1.5;
  letter-spacing: 1px;
  padding: 5px 5px 5px 5px;
  border: 2px solid rgb(150,100,100);
  border-radius: 10px;
  text-align: center;
}

label {
  padding-left: 5px; 
  padding-right: 10px;
  margin-top: -30px;
  padding-bottom: 25px;
}

@media (max-width: 400px) {  
   
  #check-boxes {
  display: flex;
  flex-direction: column; 
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}
}
#check-boxes {
  margin-bottom: 15px;
}
              
            
!

JS

              
                // !! 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

Console