css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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>
<div class="content">

  
  <h1 id="title">Survey form</h1>
  <p id="description">A survey for the precentage of people living in New York City</p>
  
  <form id="survey-form">First Name:<br>
    <input id="name-label" type="text" name="firstname" value=""><br>
        Last Name:<br>
    <input id="email-label" type="text" name="lastname"><br>
        Email address:<br>
    <input type="text" name="email"><br>
        Age:<br>
    <input  id="number" type="number" min="20" max="100" name="age"><br>
  </form>
 </div>
 
<div class="question">
  <h1>Questionnaire</h1>
  <p>What is your sex?</p><br>
  <form>
    <input type="radio" name="gender" value="male">Male<br>
    <input type="radio" name="gender" value="female">Female<br>
    <input type="radio" name="gender" value="other">Other<br>
  </form>
  <form>
  <p>How many people live in your household?</p>
    <input type="number" min="1" max="10" name="amount"><br>
  </form>
   <form>
      <p>How long have you been leaving at the current residence?</p><br>
      <input type="text" name="text"><br>
  </form>
      <form>
        <p>Would you be moving in the next 5 to 10 years?</p>
        <input type="radio" name="name" value="radio">Yes<br>
        <input type="radio" name="name" value="radio">No<br>
        <input type="radio" name="name" value="radio">Maybe<br>
        <form>
        <p>How much do you know of your neighborhood?</p>
        <input type="radio" name="name" value="alot">A good deal<br>
        <input type="radio" name="name" value="some">Some<br>
        <input type="radio" name="name" value="clueless">Clueless<br>
     </form>
  </form> 
  <div class="dropDown">
    <form id="dropdown">
      <p>What are your thoughts of your neighborhood?</p>
      <button onClick="myFunction()" class="dropbtn">Select</button>
      <div id="myDropDown" class="dropdown-content">
        <ul>
          <li>Postive</li>
          <li>Negative</li>
          <li>No thoughts</li>
        </ul>
         </div>
    </form>
  </div>
</div>
<form>
    <fieldset>
      <p>
        <label>Type in your thoughts</label>
        <textarea id="myTextArea" row="3" col="80" placeholder="place text here..."></textarea>
      </p>
    </fieldset>
    </form>
 <div class="footer" id="submit">
   <input type="submit" value="submit">
  </div>
</div>
<!--
Hello Camper!

For now, the test suite only works in Chrome! Please read the README below in the JS Editor before beginning. Feel free to delete this message once you have read it. Good luck and Happy Coding! 

- The freeCodeCamp Team 

-->

            
          
!
            
              body{
  background-color: darkcyan;
}

.content{
  background-color: lightskyblue;
  display: grid;
  margin: 100px;
  padding: 50px;
  border-radius: 10px;
  box-shadow: 3px 3px  5px black;
  
}
.content input{
  display: grid;
  background-color: white;
}
.question{
  background-color: lightskyblue;
  display: grid;
  margin: 100px;
  padding: 50px;
  border-radius: 10px;
  box-shadow: 3px 3px 5px black;
 }
.question input{
  
  background-color: white;
  
}
h1{
  text-align: center;
  color: rgb(0,139,139);
  text-shadow: 1px 1px black;
  
 }
p{
  text-align: center;
  font-size: 24px;
}
.question p{
  font-size: 20px;
  color: black;
  font-weight: bold;
  text-align: left;
}
.dropbtn{
  background-color: gray;
  color: white;
  padding: 7px;
  font-size: 16px;
  border: none;
  border-radius: 5px;
}
.dropDown{
  position: relative;
  display: inline-block;
  
  
}
.dropdown-content{
  display: none;
  position: absolute;
  background-color: #f1f1f1;
  min-width: 160px;
  box-shadow: 2px 15px 10px 0px rgba(0,0,0,0.2);
  z-index: 1;
  
}
.dropdown-content li{
  color: black;
  padding: 5px 4px;
  text-decoration: none;
  display: block;
  
}
.dropdown-content li:hover
{background-color: #ddd;}
.dropDown:hover .dropdown-content{
  display: block;
  
}
.dropDown:hover .dropbtn{
  background-color: #3e8e41;
  display: block;
}
fieldset{
  display: grid;
  margin: 100px;
  background-color: lightskyblue;
  border-radius: 20px;
}
textarea{
  width: 400px;
  height: 100px;
  box-shadow: 1px 2px 2px black;
  
  
}
label{
  padding: 10px;
  margin: 5px;
  color: black;
  font-size: 20px;
  
}
.footer input{
  padding: 10px;
  background-color: lightgray;
  font-size: 20px;
  box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
}



            
          
!
            
              function myFunction(){
  document.getElementById("myDropDown").classList.toggle("show");
  window.onclick = function(event){
    if(!event.target.matches('.dropbtn')){
      var dropdowns = document.getElementByClassName("dropdown-content");
      var i;
      for(i = 0; i< dropdown.length; i++){
        var openDropDown = dropdown[i];
        if(openDropDown.classlist.contains('show')){
          openDropDown.classlist.remove('show');
        }
      }
    }
  }
}

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

Console