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

              
                <!-- Homepage index.html -->

<main class="container" id="main">
  <heading><h1 id="title"> Energetic Future Survey Form </h1></heading>
  <hr>
  <p id="description">Already right now, we need to change the way we use our resources and where we get our energy from. Are you interested in the enviroment? Take this short survey and help us learn more about people's mentality around energy types.</p>
 
  
  <!-- Form section -->
 <div id="survey-box">
    <form id="survey-form">
      <label id="name-label" for="name"><b>Name</b></label>
    <br>
    <input id="name" type="text" class="form-cont" placeholder="Enter your name" required>
      <br>
     <label id="email-label" for="email"><b>E-mail</b></label>
    <br>
     <input id="email" type="email" class="form-cont" placeholder="Enter your e-mail" required>
    <br>
      <label id="number-label" for="number"><b>Age</b></label>
     <br>
      <input id="number" type="number" class="form-cont" placeholder="Select your age" min="0" max="99" required>
      <br>
      <label id="gender"><b>Gender</b></label>
      <br>
      <div id="radio-cont">
      <label><input type="radio" name="gender" value="male">Male</label>
      <label><input type="radio" name="gender" value="female">Female</label>
      <label><input type="radio" name="gender" value="other">Other</label>
      </div>
      
      <label id="cat"><b>Which energy cathegory do you believe the most in?</b></label>
      <br>
      <select id="dropdown">
        <option disabled selected value>Which energy cathegory do you believe the most in?</option>
        <option>Renewable Energy</option>
        <option>Fossil Fuels</option>
        <option>Alternate (nuclear/chemical)</option>
      </select>
      
      <br><br>
      
      <div id="best-energy">
      <label><b>What are the three best Energy sources?</b></label> 
        <br>
      <label><input type="checkbox" value="wind">Wind</label>
      <label><input type="checkbox" value="solar">Solar</label>
      <label><input type="checkbox" value="geothermal">Geothermal</label>
      <label><input type="checkbox" value=="water">Water</label>
      <br>
      <label><input type="checkbox" value="nuclear">Nuclear</label>
      <label><input type="checkbox" value="fossil">Fossil</label>
      <label><input type="checkbox" value="biomasses">Biomasses</label>
      <label><input type="checkbox" value="tidal">Tidal</label>
      <label><input type="checkbox" value="other">Other</label>
      </div>
    
      <br>
      
      <div id="worst-energy">
      <label><b>What are the three worst Energy sources?</b></label> 
      <br>
      <label><input type="checkbox" value="wind">Wind</label>
      <label><input type="checkbox" value="solar">Solar</label>
      <label><input type="checkbox" value="geothermal">Geothermal</label>
      <label><input type="checkbox" value="water">Water</label>
      <br>
      <label><input type="checkbox" value="nuclear">Nuclear</label>
      <label><input type="checkbox" value="fossil">Fossil</label>
      <label><input type="checkbox" value="biomasses">Biomasses</label>
      <label><input type="checkbox" value="tidal">Tidal</label>
      <label><input type="checkbox" value="other">Other</label>
      </div>
      
      <br>
      
      <label><b>Additional Comments or Suggestions?</b></label>
      <br>
      <textarea id="additional" type="text" placeholder="Enter your comments and suggestions here"></textarea>
      
      <div id="submit-div"><button type="submit" id="submit">Submit</button></div> 
  </form>
  </div>
  
</main>
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>

              
            
!

CSS

              
                /* Main stylesheet  index.css */


/* Responsive web design for mobile */
@media all and (max-width: 600px) {
  body {
    background-color:purple;
  }
  .container {
   background-color: orange;
  width: 310px;
}
  #title {
  position: relative;
  margin-top: 10px;
    margin-left: 20px;
  font-family: "Goudy Old Style", serif;
  color: indigo;
  text-shadow: 1.5px 1.0px #00000F;
}
  #description {
    position: relative;
    left: 10px;
    margin-right: 26px;
  }
  #survey-box {
    position: relative;
    left: 10px;
    margin-right: 10px;
  }
  .form-cont {
    postiion: relative;
    margin-top: 2px;
    margin-bottom: 10px;
  }
  #number {
    width: 170px;
  }
  #radio-cont {
    position: relative;
    margin-top:2px;
    margin-bottom:10px;
  }
  #dropdown {
    position: relative;
    margin-top:2px;
    margin-bottom:10px;
    width: 290px;
  }
  #best-energy {
    background-color: cyan;
    position: relative;
    margin-right: 15px;
  }
  #worst-energy {
    background-color: pink;
    position: relative;
    margin-right: 15px;
  }
  #additional {
    height:70px;
    width:280px;
  }
  #submit-div {
    display:block;
    margin: 20px 20px 20px auto;
    padding: 25px;
    background-color:green;
  }
  #submit {
    color: black;
    width: 230px;
    height: 40px;
  }
}

/* Reponsive web design for Ipad */
@media all and (min-width: 600px) and (max-width: 950px){
  body {
    background-color: purple;
  }
.container {
background-color: orange;
 width: 810px;
  margin-left:5px;
}
  #title {
  position: relative;
  margin-top: 10px;
    margin-left: 20px;
  font-family: "Goudy Old Style", serif;
  color: indigo;
  text-shadow: 1.5px 1.0px #00000F;
}
  #description {
    position: relative;
    left: 10px;
    margin-right: 250px;
  }
  #survey-box {
    position: relative;
    left: 10px;
  }
  .form-cont {
    postiion: relative;
    margin-top: 2px;
    margin-bottom: 10px;
    width: 200px;
    height: 30px;
  }
  #number {
    width: 170px;
  }
  #radio-cont {
    position: relative;
    margin-top:2px;
    margin-bottom:10px;
  }
  #dropdown {
    position: relative;
    margin-top:2px;
    margin-bottom:10px;
  }
  #best-energy {
    background-color: cyan;
    position: relative;
    margin-right: 450px;
  }
  #worst-energy {
    background-color: pink;
    position: relative;
    margin-right: 450px;
  }
  #additional {
    height:70px;
    width:280px;
  }
  #submit-div {
    display:relative;
    margin: 0px 525px 20px 3px;
    padding: 10px;
    background-color:green;
  }
  #submit {
    color: black;
    position: relative;
    left: 20px;
    right: 250px;
    width: 230px;
    height: 40px;
  }
}

@media all and (min-width: 950px) {
  body {
    background-color: purple;
  }
  .container {
background-color: orange;
 width: device-width;
} 
  #title {
  position: relative;
  margin-top: 10px;
  font-family: "Goudy Old Style", serif;
  color: indigo;
  text-shadow: 1.5px 1.0px #00000F;
}
  #description {
    position: relative;
    left: 10px;
    margin-right: 1200px;
  }
  #survey-box {
    position: relative;
    left: 10px;
  }
  .form-cont {
    postiion: relative;
    margin-top: 2px;
    margin-bottom: 10px;
    width: 200px;
    height: 30px;
  }
  #number {
    width: 170px;
  }
  #radio-cont {
    position: relative;
    margin-top:2px;
    margin-bottom:10px;
  }
  #dropdown {
    position: relative;
    margin-top:2px;
    margin-bottom:10px;
  }
  #best-energy {
    background-color: cyan;
    position: relative;
    margin-right: 1500px;
  }
  #worst-energy {
    background-color: pink;
    position: relative;
    margin-right: 1500px;
  }
  #additional {
    height:70px;
    width:280px;
  }
  #submit-div {
    display:relative;
    margin: 0px 1600px 20px 2px;
    padding: 10px;
    background-color:green;
  }
  #submit {
    color: black;
    position: relative;
    left: 20px;
    right: 250px;
    width: 230px;
    height: 40px;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console