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

              
                <!HTML DOCTYPE>

<html>

<body>
  <header>
    <h1 id="title">Community Survey Form</h1>
  </header>

  <main>
    <p id="description">let us know what we could improve around your community.</p>

    <form id="survey-form" method="GET" action="https://crossorigin.me/https://freecodecamp.com">

      <div class="rowTab">
        <div class="labels">
          <label id="name-label" for="name">* Name:</label>
        </div>
        <div class="rightTab">
          <input autofocus id="name" class="input-field" placeholder="Enter Name Here" required>
        </div>
      </div>

      <div class="rowTab">
        <div class="labels">
          <label id="email-label" for="email">* Email:</label>
        </div>
        <div class="rightTab">
          <input type="email" id="email" class="input-field" placeholder="Enter Email Here" required>
        </div>
      </div>

      <div class="rowTab">
        <div class="labels">
          <label for="gender"> Gender:</label>
        </div>
        <div class="rightTab">
          <select id="dropdown-gender" name="gender" class="dropdown">
            <option>Male</option>
            <option>Female</option>
          </select>
        </div>
      </div>

      <div class="rowTab">
        <div class="labels">
          <label id="number-label" for="age">Age:</label>
        </div>
        <div class="rightTab">
          <input type="number" name="age" id="number" min="1" max="110" class="input-field" placeholder="Age">
        </div>
      </div>

      <div class="rowTab">
        <div class="labels">
          <label for="currentPos">
            Which option best describes your current employent?
          </label>
        </div>
        <div class="rightTab">
          <select id="dropdown" name="currentPos" class="dropdown">
            <option disable value>chose one</option>
            <option value="student">Student</option>
            <option value="full-time">Employed: Full-time</option>
            <option value="part-time">Employed: Part-time</option>
            <option value="unemployed">Unemployed</option>
            <option value="preferNo"> prefer not to say</option>
            <option value="other">other</option>
          </select>
        </div>
      </div>

      <div class="rowTab">
        <div class="labels">
          <label for="userAttendance">
                How likely is that you would attend your next local community gatherings/meetings?
              </label>
        </div>
        <div class="rightTab">
          <ul style="list-style: none;">

            <li class="radio">
              <label>
                  <input type="radio" value="1" name="radio-button" class="userAttendance">
                Definitely
                </label>
            </li>

            <li class="radio">
              <label>
                  <input type="radio" value="2" name="radio-button" class="userAttendance"> Maybe
                </label>
            </li>

            <li class="radio">
              <label>
                  <input type="radio" value="3" name="radio-button" class="userAttendance"> Not Sure
                </label>
            </li>
          </ul>
        </div>
      </div>

      <div class="rowTab">
        <div class="labels">
          <label for="topic">what topics you would like to discuss in the next meeting? (choose all that apply)</label>
        </div>
        <div class="rightTab">
          <ul id="checkbox" style="list-style: none;">
            <li class="checkbox"><label>
              <input type="checkbox" value="1" class="prefer" name="topics">Safety</label></li>
            <li class="checkbox"><label>
              <input type="checkbox" value="2" class="prefer" name="topics">Schools
              </label></li>
            <li class="checkbox"><label>
              <input type="checkbox" value="3" class="prefer" name="topics">Sanitation
              </label></li>
            <li class="checkbox"><label>
              <input type="checkbox" value="4" class="prefer" name="topics">Rent
               </label></li>
            <li class="checkbox"><label>
              <input type="checkbox" value="5" class="prefer" name="topics">Events
               </label></li>
            <li class="checkbox"><label>
              <input type="checkbox" value="6" class="prefer" name="topics">Other
               </label></li>
          </ul>
        </div>
      </div>

      <div class="rowTab">
        <div class="labels">
          <label for="commentBox">If you selected other, please explain in detail.</label>
        </div>
        <div class="rightTab">
          <textarea id="comments" class="input-field" style="height: 50px;resize: vertical" placeholder="Enter Comments Here..."></textarea>
        </div>
      </div>

      
      <input id="submit" type="submit" value="Submit" class="btn" />
    
    </form>

  </main>
  <footer></footer>
</body>

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

</html>
              
            
!

CSS

              
                

@import url('https://fonts.googleapis.com/css?family=Montserrat&display=swap');

html,
body {
  background: skyblue;
  background-image: linear-gradient( white, skyblue);
  background-repeat: no-repeat;
  display:  flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  font-family: 'Montserrat';
  min-width: 320px;
 }

header {
  margin: auto;
  align-self: center;
  
}

main{
  background: white;
  align-self: center;
  width: 75%;
  max-width: 900px;
  padding: 10px;
  padding-top: 20px;
  border-radius: 5px;
}   

.rowTab {
  width: 100%;
  margin: auto;
}

.labels {
  display: inline-block;
  width: 40%;
  padding: 5px;
  margin-top: 10px;
  text-align: right;
  vertical-align: top;
}

.rightTab{
  display: inline-block;
  width: 48%;
  text-align: left;
  vertical-align: middle;
}

.input-field {
  width: 280px;
  height: 20px;
  padding: 5px;
  margin: 10px;
  border: 1px solid #c0c0c0;
  border-radius: 2px;
}

#userAge {
  width: 40px;
} 

.dropdown {
  height: 35px;
  width: 140px;
  padding: 5px;
  margin: 10px;
  margin-top: 15px;
  border-radius: 2px;
}

.radio, .checkbox {
  position: relative;
  display: block;
  left: -45px;
  margin-left: 10px;
  padding-button: 10px;
}

.prefer , input[type="checkbox"] {
  float: left;
  margin-left: 5px;
}

 input[type="submit"] {
  background:#e28413;
  padding: 10px 20px;
  margin: 10px;
  border-radius: 6px;
  
}


@media screen and (max-width: 833px) {
  .input-field {
    width: 80%;
  }
  select {
    width: 90%;
  }
}

@media screen and (max-width: 520px) {
  .labels {
    width: 100%;
    text-align: left;
  }
  .rightTab {
    width: 80%;
    float: left;
  }
  .input-field {
    width: 100%;
  }
  select {
    width: 100%;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console