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. 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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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>

<body>
  <div id="main">
    <h1 id="title">COVID-19 PANDEMIC CHECK SURVEY</h1>
    <p id="description">Stay Home, Save lives! This survey will help us to identify your needs and welfare. Thank you!</p>
    <form id="survey-form">
      <fieldset class="fieldarea">
        <legend>Personal Information:</legend>
        <div>
        <label for="firstname" id="name-label">First Name</label>
           <input type="text" id="name" name="firstname" class="input-style" placeholder="Enter First Name" required />
        </div>
        <div>
        <label for="lastname" id="name-label">Last Name</label>
           <input type="text" id="name" name="lastname" class="input-style" placeholder="Enter Last Name" required />
        </div>
        <div>
          <label for="status" id="marital_status-label">Civil Status</label>
          <select name="marital_status" id="marital_status" class="input-style" required>
            <option value="">-Select Marital Status-</option>
            <option value="Single">Single</option>
            <option value="Married">Married</option>
            <option value="Widowed">Widowed</option>
            <option value="Separated">Separated</option>
            <option value="Divorced">Divorced</option>
          </select>
        </div>
        <div>
          <label for="age" id="number-label">Age<span id="ins">(Required)</span></label>
            <input type="number" id="number" class="input-style" placeholder="Age" name="age" min="0" max="100" required />
        </div>
        <div>
          <label for="gender" id="gender-label">Gender</label>
            <select name="gender" id="gender" class="input-style" required>
              <option value="">-Select Gender-</option>
              <option value="Male">Male</option>
              <option value="female">female</option>
          </select>
        </div>
        <div>
        <label for="email" id="email-label">Email</label>
           <input type="email" id="email" name="email" class="input-style" placeholder="Enter Valid Email" pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$" title="ERROR:missing @" required />
        </div>
      </fieldset>
      <fieldset class="fieldarea">
        <legend>Fill-up the questions below with HONESTY</legend>
        <div>
          <label for="dropdown" class="text-style"><b>Which of the choices below do you belong?</b></label>
            <select name="role" id="dropdown" class="input-style" required>
              <option value="">-Select here-</option>
              <option value="Frontliner">Frontliner</option>
              <option value="Government Worker">Government Workers</option>
              <option value="Private Worker">Private Workers</option>
              <option value="Overseas Worker">Overseas Worker</option>
              <option value="Student">Student</option>
              <option value="Self-employed">Self-employed</option>
              <option value="Unemployed">Unemployed</option>
          </select>
        </div>
        <div>
          <legend class="text-style">How worried are you about the effects of this PANDEMIC in your overall life?</legend>
          <label for="user-worry" class="text-style">
            <input type="radio" class="radio-style" name="user-worry" value="Extremely-Worried" />Extremely-Worried
          </label>
          <label for="user-worry" class="text-style">
            <input type="radio" class="radio-style" name="user-worry" value="Very-Worried" />Very-Worried
          </label>
          <label for="user-worry" class="text-style">
            <input type="radio" class="radio-style" name="user-worry" value="Somewhat-Worried" />Somewhat-Worried
          </label>
          <label for="user-worry" class="text-style">
            <input type="radio" class="radio-style" name="user-worry" value="Not-so-Worried" />Not-so-Worried
          </label>
          <label for="user-worry" class="text-style">
            <input type="radio" class="radio-style" name="user-worry" value="Not-at-all-Worried" />Not-at-all-Worried
          </label>
        </div>
        <div>
          <legend class="text-style">What are the BIGGEST CHALLENGES you are currently facing amidst this crisis?</legend>
          <label for="challenges" class="text-style">
            <input type="checkbox" class="check-style" name="challenges" value="Getting Enough Food" />Getting Enough Food
          </label>
          <label for="challenges" class="text-style">
            <input type="checkbox" class="check-style" name="challenges" value="Finding Work" />Finding Work
          </label>
          <label for="challenges" class="text-style">
            <input type="checkbox" class="check-style" name="challenges" value="Social Distancing" />Social Distancing
          </label>
          <label for="challenges" class="text-style">
            <input type="checkbox" class="check-style" name="challenges" value="Childcare" />Childcare
          </label>
          <label for="challenges" class="text-style">
            <input type="checkbox" class="check-style" name="challenges" value="Getting Sick" />Getting Sick
          </label>
          <label for="challenges" class="text-style">
            <input type="checkbox" class="check-style" name="challenges" value="Discrimination when getting sick" />Discrimination when getting sick
          </label>
          <label for="challenges" class="text-style">
            <input type="checkbox" class="check-style" name="challenges" value="Anxiety of contracting the Virus" />Anxiety of contracting the Virus
          </label>
          <label for="challenges" class="text-style">
            <input type="checkbox" class="check-style" name="challenges" value="Scarcity and Economic downfall" />Scarcity and Econimic downfall
          </label>
          <label for="challenges" class="text-style">
            <input type="checkbox" class="check-style" name="challenges" value="Others" />Others<span id="ins">(Please Specify)</span>
          </label>
          <textarea
        id="comments"
        class="style-textarea"
        name="comment"
        placeholder="Specify here..."
      ></textarea>
        </div>
      </fieldset>
      <fieldset class="fieldarea">
          <legend>For more suggestions. Leave us a comment below.</legend>
        <div>
         <textarea
        id="comments"
        class="style-textarea"
        name="comment"
        placeholder="Leave your comment here..."
      ></textarea>
        </div>
      </fieldset>
      <div>
        <button type="submit" id="submit" class="submit-button">Submit</button>
      </div>
    </form>
  </div>
</body>

              
            
!

CSS

              
                * {
  box-sizing: border-box;
}

body {
  font-size: 1.2em;
  line-height: 1.7em;
  color: white;
}

#main {
  width: 100%;
  margin: 55px auto 0 auto;
}

@media (min-width: 500px) {
  #main {
    max-width: 540px;
  }
}

@media (min-width: 764px) {
  #main {
    max-width: 700px;
  }
}

#title {
  text-align: center;
  line-height: 1.2em;
  font-family: Impact;
  text-shadow: 0 0 20px;
}

#description {
  text-align: center;
  line-height: 1.2em;
  margin-bottom: 0.7em;
  font-family: 'Comic Sans MS';
  font-weight: bold;
}

#survey-form {
  background: rgb(16, 16, 10, 0.9);
  border-radius: 10px;
  padding: 10px 40px 10px 40px;
  box-shadow: 0 0 10px black;
}

@media (max-width: 540px) {
  #survey-form {
    padding: 10px;
  }
}
.fieldarea {
  margin: 1.5em auto 0 auto;
  padding: 0.25em;
}

label {
  display: flex;
  align-items: center;
  margin-bottom: 0px;
  font-size: 19px;
  font-family:  'Courier New';
}

input, textarea, select, button {
  font-size: 16px;
  font-family: cursive;
}

.input-style {
  display: block;
  width: 100%;
  height: 38px;
  padding: 5px;
  margin-bottom: 15px;
  color: rgb(31, 31, 20);
  background-clip: padding-box;
  border-radius: 5px;
}

.input-style:focus {
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 7px black;
}

.style-textarea {
  display: block;
  width: 100%;
  height: 7em;
  padding: 5px;
  color: rgb(31, 31, 20);
  background-clip: padding-box;
  border-radius: 5px;
}

button {
  display: inline-block;
  width: 100%;
  height: 50px;
  background: #f1f1f1
  margin: 10px;
  border-radius: 30%;
  box-shadow: 0 5px 15px -5px silver;
  color: #3498db;
  overflow: hidden;
  position: relative;
}

legend {
  font-size: 22px;
  font-family: Candara;
  font-weight: bold;
}

#ins {
  margin-left: 7px;
}
@media (max-width: 540px) {
  .fieldarea {
    margin: 15px 0;
  }
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: -1;
  background: rgb(194, 194, 163);
  background-image: linear-gradient(
      180deg,
      rgba(194, 194, 163, 0.7),
      rgba(61, 61, 41, 0.4)
  ),
    url("https://i.postimg.cc/CKJv1k9j/coronavirus-statistics-on-screen-3970330.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}




              
            
!

JS

              
                
              
            
!
999px

Console