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

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

<!DOCTYPE html>
<html  lang="en">
  <body>
   <h1 id="title">Music Servey</h1> 
    <p id="description">This is an online survey for music listeners.</p> 
    
      <form id="survey-form">
    <fieldset class="box2" >
      
  <ul class="input">
    
    <label id="name-label">
 <li>Name<input id="name" class="input" type="text" placeholder="Enter your name" required><br></li> 
    </label>
    
      <label id="email-label">
  <li> Email<input id="email" class="input" type="email" placeholder="Enter your email" required><br></li>
        </label>
    
        <label id="number-label">
  <li>Age<input id="number" class="input" type="number"  placeholder="Age"  min="10" max="200" required></li>
    </label>
    
    </ul>
      
    </fieldset>
    <br>
        
    <!--end of box2-->
    <!--start of box1-->
     <fieldset  class="box1">
  <legend>What gender are you?</legend>
       
       <ul>
        <li>
       <label for="male">
  <input type="radio" value="male" id="male" name="gender">Male
         </label>
       </li>
        <li>
       <label for="female">  <input type="radio" value="female" id="female" name="gender">Female
         </label>
       </li>
       </ul>
    </fieldset><br>
    <fieldset class="box1">
  <legend>Where do you live?</legend>
      <ul>
        <li>
  <label for="africa">
    <input type="radio" value="africa" id="africa" name="continent">Africa
     </label>
      </li>
        <li>
      <label for="europe">     
       <input type="radio" value="europe" id="europe" name="continent">Europe
         </label>
      </li>
        <li>
      <label for="america">
   <input type="radio" value="america" id="america" name="continent">America
        </label>
      </li>
        <li>
      <label for="asia">
    <input type="radio" value="asia" id="asia" name="continent">Asia
         </label>
      </li>
        <li>
      <label for="ociana">
    <input type="radio" value="ociana" id="ociana" name="continent">Ociana
  </label>
      </li>
      </ul>
      </fieldset><br>
    <fieldset class="box3">
  <legend>How often do you listen to music on a daily basic?</legend>  
      <div id="dropdown">
      <select name="slt-1" id="slt-1">
        <option>chose an option</option>
        <option value="1">1-3 times</option>
        <option value="2">4-7 times</option>
        <option value="3">8-10 times</option>
        <option value="4">Frequently</option>
        <option value="5">None</option>
          </select>
     </div>
      </fieldset><br>
    <!--start of box1-->
     <fieldset class="box1">
   <legend>What are you favourites genres of music?</legend>
       <ul>
        <li>
   <label for="music">
    <input type="checkbox" value="music" id="music" name="music-genre">I don't realy like music
     </label>
       </li>
        <li>
      <label for="instrumental">
    <input type="checkbox" id="instrumental" value="instrumental" name="music-genre">Instrumental
         </label>
       </li>
        <li>
        <label for="country">
    <input type="checkbox" value="country" id="country" name="music-genre">Country
           </label>
       </li>
        <li>
         <label for="jazz">
    <input type="checkbox" id="jazz" value="jazz" name="music-genre">Jazz
             </label>
       </li>
        <li>
          <label for="classical">
    <input type="checkbox" id="classical" value="classical" name="music-genre">Classical
               </label>
       </li>
        <li>
         <label for="pop">
    <input type="checkbox" id="pop" value="pop" name="music-genre">Pop
                 </label>
       </li>
        <li>
         <label for="rock">
    <input type="checkbox" id="rock" value="rock" name="music-genre">Rock
                   </label>
       </li>
        <li>
        <label for="alternative">
    <input type="checkbox" value="alternative" id="alternative" name="music-genre">Alternative
                     </label>
       </li>
        <li>
        <label for="r'n'b">
    <input type="checkbox" value="r'n'b" id="r'n'b" name="music-genre">R'n'B
                       </label>
       </li>
        <li>
      <label for="reggae">
    <input type="checkbox" value="reggae" id="reggae" name="music-genre">Reggae
                         </label>
       </li>
        <li>
        <label for="k-pop">
    <input type="checkbox" value="k-pop" id="k-pop" name="music-genre">K-pop         </label>
       </li>
        <li>
       <label for="types">
    <input type="checkbox" value="music-genre" id="types" name="music-genre">No preference I enjoy all typese I enjoy all types                       </label> 
       </li>
       </ul>
      </fieldset><br>
<!--end of box3-->
     <fieldset class="box1">
   <legend>How do you listen to music?</legend>
       <ul>
        <li>
  <label for="cd">
    <input type="checkbox" value="cd" id="cd" name="genre">CD
       </label>
       </li>
        <li>
       <label for="radio">
    <input type="checkbox" value="radio" id="radio" name="genre">Radio
         </label>
       </li>
        <li>
         <label for="spotify">
    <input type="checkbox" value="spotify" id="spotify" name="genre">Spotify
           </label>
       </li>
        <li>
           <label for="youtube">
    <input type="checkbox" value="youtube" id="youtube" name="genre">Youtube
             </label>
       </li>
        <li>
            <label for="tv">
    <input type="checkbox" value="tv" id="tv" name="genre">TV
               </label>
       </li>
        <li>
          <label for="phone">
    <input type="checkbox" value="phone" id="phone" name="genre">Phone
                 </label>
       </li>
        <li>
             <label for="other">
    <input type="checkbox" value="other" id="other" name="genre">Other
  </label>
       </li>
       </ul>
       </fieldset><br>
    <fieldset class="box1">
<legend>How often do you go to concert?</legend>
      <ul>
        <li>
   <label for="never">
    <input type="radio" value="never" id="never" name="number">Never
      </label>
      </li>
        <li>
      <label for="not-much">
    <input type="radio" value="not-much" id="not-much" name="number">Not-Much
         </label>
      </li>
      <li>
        <label for="sometimes">
    <input type="radio" value="sometimes" id="sometimes" name="number">Sometimes
           </label>
      </li>
        <li>
   <label for="every-week-end">
    <input type="radio" value="every-week-end" id="every-week-end" name="number">Every Week-End
  </label>
        </li>
      </ul>
      </fieldset><br>
    <fieldset class="box1">
<legend>Where do you hear about your latest music?</legend>
      <ul>
        <li> 
          <label for="social-network">
    <input type="checkbox" value="social-network" id="social-network" name="news">Social-Network
     </label>
        </li>
        <li> 
    <label for="television">
    <input type="checkbox" value="tv" id="television" name="news"> TV
       </label>
          </li>
        <li> 
      <label for="radio">
    <input type="checkbox" value="radio" id="radio" name="news">Radio
       </label>
        </li>
        <li> 
    <label for="other">
    <input type="checkbox" value="other" id="other" name="news">Other
  </label>
          </li>
      </ul>
      </fieldset>
  <br>
    <fieldset class="box1">
<legend>For addintional information please enter here?</legend>
        <label for="message">
      <textarea name="message" id="message"></textarea>
         </label>
      </fieldset>
<!--end of box1-->
        <button id="sub" type="submit">Submit</button>
   </form>
 </body> 
</html>
              
            
!

CSS

              
                title{
  font-family: monospace, helvetica;
  font-size: 25%;
}
body{  
  font-family: monospace, helvetica;
}
h1{  
  color: purple;
  text-align: center;
}
p{
  font-style: italic;
  font-weight: bold;
  font-size: 25px;
  color: red;
  margin: 10px;
  text-align: center;
}
#survey-form{  
  list-style: none;
  max-width: 100%;
}
.box2{  
  list-style: none;
  background-color: #87CEFA;
  padding: 15px;
  width: 60%;
  margin: auto; 
}
.box2 ul{  
  list-style: none;
}
.box2 ul li{  
  padding-bottom: 10px;
}
.box2 .input{
  display: block;
  padding: 8px;
  margin-top: 10px;
  width: 70%;
}
.box1{  
  background-color: #87CEFA;
  padding: 15px;
  width: 60%;
  margin: auto;
}
.box1 ul{
  list-style: none;
  margin-left: -50px;
}
.box3{
  list-style: none;
  background-color: #87CEFA;
  padding: 15px;
  width: 60%;
  margin: auto;
}
select{  
  border-radius: 6px;
  border: 3px solid #000000;
  background: #FFFFFF;
  width: 100%;
  height: 100%;
  padding-left: 5px;
  font-size: 16px;
  font-family: monospace, helvetica;
}
#dropdown{
  width: 100%;
  height: 40px;
}
#sub{  
  font-weight: bold;
  padding: 8px;
  margin: auto;
  width: 60%;
}
#submit:hover{  
  color: #FF0000;
  box-shadow: 5px 10px 0px 0px silver;
}
              
            
!

JS

              
                
              
            
!
999px

Console