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

              
                
<!Doctype HTML>
<html>
  <head>
   <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
    
    <link href="//db.onlinewebfonts.com/c/1d31ad93141bfef13948ae77a9a5356e?family=Coves" rel="stylesheet" type="text/css"/> 
    <link href="//db.onlinewebfonts.com/c/5ab6daa0d6e9671e90d8c160581dccc7?family=Coves" rel="stylesheet" type="text/css"/>
    <meta charset="utf-8">
    <meta name="viewport" content="width=devicewitdh, inital-scale=1.0">
    <title>Survey Form</title>
  </head>
  <body>
<div class="container">
  
  <!--HEADER -->
  
  <header>
 <!--HEADLINE and DESCRIPTION-->
    
    <h1 id="title">Your Preferences</h1>
  <p id="description">The goal of this survey is to find out what you like.</p>
  </header>
  
  
   
    
  
  
  <!--SURVEY FORM-->
 
    <form id="survey-form" action="/action_page.php">
    <fieldset>
      <legend>Information About You</legend>
      
      <div class="form-group">
      <label for="name" id="name-label">Name:</label><br>
        <input id="name" type="text" required placeholder="First and Last Name"/>
      </div>
      
      <div class="form-group">
      <label for="email" id="email-label">Email:</label><br>
      <input id="email" type="email" required placeholder="Enter Email Adress">
      </div>
      
      <div class="form-group">
      <label for="age" id="number-label">Age:</label><br>
      <input id="age" type="number" required placeholder="12-99" min="12" max="99"/>
      </div>
      
        <div class="form-group">
      <label for="gender" id="gender-label">Gender:</label><br>
      <select id="gender">
        <option disabled selected value>Select Your Gender</option>
        <option value="Male">Male</option>
        <option value="Female">Female</option>
      </select>
      </div>
      
      <div class="form-group" id="number">
      <label for="phone" id="phone-label">Mobile Number:</label><br>
      <input type="tel" id="phone" placeholder="(optional)" minLength="11" maxLength="12" />
      </div>
</fieldset>
    
       <!--PREFERENCES-->
    
    <fieldset class="preferences">
      <legend>Tell Us Your Preferences</legend>
       
       <div class="form-group" id="dogcatperson">
         <label>Are you a cat or a dog person?</label>
   
          <div>
           <label for="CatPerson"><input id="CatPerson" name="catdog" value="CatPerson" type="radio" class="catdog">Cat Person</label>
          </div>
      
     
      <div class="form-group">            
     <label for="DogPerson"><input id="DogPerson" name="catdog" value="DogPerson" type="radio" class="catdog">Dog Person</label>
      </div>
      
      <div class="form-group">
      <label for="dontknow"><input id="dontknow" name="catdog" value="dontknow" type="radio" class="catdog">Don't Know</label> 
      </div>
      </div>
      
      <div class="form-group" id="color">
        <label for="favcolor">What's your favorite color?
          <input type="color" id="favcolor" value="#000"></label>
      </div>
      
      <div class="form-group" id="movie-genre">
        <p>What is your favorite movie genre?</p>
        <label for="dropdown" id="dropdown-label">
          <select id="dropdown">
            <option disabled selected value>Favorite Movie Genre</option>
            <option value="Thriller">Thriller</option>
            <option value="Action">Action</option>
            <option value="Romance">Romance</option>
            <option value="Drama">Drama</option>
            <option value="History">History</option>
            <option value="Comedy">Comedy</option>
            <option value="Fantasy">Fantasy</option>
            <option value="Horror">Horror</option>
            <option value="Adventure">Adventure</option>
            <option value="Western">Western</option>
            <option value="Science-Fiction">Science Fiction</option>         
          </select>
        </label>
      </div>
      
      <div class="form-group" id="continent">
        <p>Which of these continents would you like to visit someday?</p><br>
        
        <label for="continent1">
        <input 
               type="checkbox" 
               id="continent1" 
               name="continent" 
               value="continent1"/>Africa</label> 
          
       <label for="continent2">
         <input 
                type="checkbox" 
                id="continent2" 
                name="continent" 
                value="continent2">North America</label> 
          
      <label for="continent3">
        <input type="checkbox"
               id="continent3" 
               name="continent" 
               value="continent3">Asia</label>
          
        <label for="continent4">
          <input type="checkbox"
                 id="continent4" 
                 name="continent" 
                 value="continent4">Australia</label>
        
        <label for="continent5">
          <input type="checkbox"
                 id="continent5"
                 name="continent" 
                 value="continent5">South America</label> 
        
        <label for="continent6">
          <input type="checkbox"
                 id="continent6"
                 name="continent"
                 value="continent6">Europe</label> 
        
         <label for="continent7">
           <input type="checkbox" 
                  id="continent7" 
                  name="continent" 
                  value="continent7">Antarctica</label>
      </div>
    </fieldset>
      
    
    <!--COMMENT-SECTION & SUBMIT-BUTTON-->
    
      <div class="form-group">
      <label for="comment">Voice Your Opinion</label><br>
        <textarea id="comment" placeholder="Tell Us What You Like!" rows="10" cols="20"></textarea>
      </div>
    
      <div class="form-group">
        <input id="submit" type="submit" value="Submit">
      </div>
  </form>
</div>
  </body>
  
  <!--FOOTER-->
  
  <footer id="footer">Thanks for completing our survey. We appreciate it!<small><p style="font-weight: normal;">&copy Coded by Markus Petereit || Project for freecodecamp.org</p></small></footer>
</html>
              
            
!

CSS

              
                @import url(//db.onlinewebfonts.com/c/1d31ad93141bfef13948ae77a9a5356e?family=Coves);

@font-face {font-family: "Coves"; src: url("//db.onlinewebfonts.com/t/1d31ad93141bfef13948ae77a9a5356e.eot"); src: url("//db.onlinewebfonts.com/t/1d31ad93141bfef13948ae77a9a5356e.eot?#iefix") format("embedded-opentype"), url("//db.onlinewebfonts.com/t/1d31ad93141bfef13948ae77a9a5356e.woff2") format("woff2"), url("//db.onlinewebfonts.com/t/1d31ad93141bfef13948ae77a9a5356e.woff") format("woff"), url("//db.onlinewebfonts.com/t/1d31ad93141bfef13948ae77a9a5356e.ttf") format("truetype"), url("//db.onlinewebfonts.com/t/1d31ad93141bfef13948ae77a9a5356e.svg#Coves") format("svg"); } 

* { 
border-sizing: border-box;
  padding: 0;
  margin:0;
}

body {
  background: url("https://images.pexels.com/photos/533923/pexels-photo-533923.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940") no-repeat;
  background-attachment: fixed;
  background-size: cover;
  object-fit: cover;
  font-family: Coves;
  font-size: 1.25em;
 font-weight: 700;
}

.container {
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#title {
  font-size: 5rem;
  margin-bottom: 1rem;
  margin-top: 1.5rem;
  color: #fff;
}

#description {
  font-size: 1.75rem;
  margin-bottom: 3rem;
  color: #fff;
}


#survey-form {
    width: 50vw;
    height: contain;
    background: rgba(202, 207, 210, 0.75);
    padding: 1em 1em;
    border-radius: 0.5em;
  }

 fieldset {
  border-radius: 0.5em;
  border: .6 solid #000;
  margin: 1em;
  outline: none;
}

legend {
  font-size: 1.25em;
  }

input, select, color {
width: 100%;
padding: 0.75em 0.1em;
outline: none;
border-radius: 0.5em;
margin-top: 0.75em;
font-family: Coves;
font-size: 1em;
}

input:focus, #dropdown:focus, #gender:focus  {
  background-color: #E0FFFF;
  border: 2px solid #708090;
}

#comment {
  width: 100%;
  height: 6em;
  border-radius: 0.5em;
  outline: none;
  font-family: Coves;
  font-size: 1em;
  margin-top: 1em;
  margin-bottom: -2em;
  resize: none;
  padding: 0.25em;
} 

.form-group {
padding: 1em;
}




.preferences { 
 position: relative;
  

}
  
  


#continent {
  display: grid;        /* muss geändert werden*/
  grid-gap: 0.5em;
}

#submit {
  width: 100%;
  font-weight: 700;
}

#submit:hover {
 cursor: pointer;
 color: #FFF;
 background-color: #006994; 
}


footer {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  padding-top: 2rem;
  line-height: 2.5rem;
  }

@media (max-width: 720px){
 #survey-form {
  width:  100%;
}
}

@media (max-width: 620px){
  #survey-form {
    padding: 1em;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console