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 lang="en">

<head>
  <link rel="stylesheet" href="style.css">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Market Survey Form</title>
</head>
<main>
  <div id="continer">
    <div id="form-continer">
      <h1 id="title">Market Survey Form</h1>
      <p id="description"> Market Survey</p>
      <hr>
      <form id="survey-form">
        <label for="name" id="name-label">Name:</label>
        <input type="text" id="name" placeholder="Enter Your Name" required>

        <label for="email" id="email-label">Email:</label>
        <input type="email" id="email" name="email" placeholder="Enter Your Email" required>

        <label for="number" id="number-label">Number:</label>
        <input type="number" id="number" placeholder="Enter Your Number" min="1" max="100000">

        <label for="dropdown" id="age-label">Age:</label>
        <select name="dropdown" id="dropdown">
          <option value="empty" label="empty"></option>
          <option value="0 - 17">0 - 17</option>
          <option value="18 - 24">18 - 24</option>
          <option value="25 - 34">25 - 34</option>
          <option value="35 - 44">35 - 44</option>
          <option value="45 - 54">45 - 54</option>
          <option value="55 - 64">55 - 64</option>
          <option value="65 or more">65 or more</option>
        </select>

        <label for="seconddown" id="education-label">Highest level of education:</label>
        <select name="seconddown" id="seconddown">
          <option value="empty" label="empty"></option>
          <option value="High School">High School</option>
          <option value="College Graduate">College Graduate</option>
          <option value="Vocational Degree">Vocational Degree</option>
          <option value="Bachelor Degree">Bachelor Degree</option>
          <option value="Master Degree">Master Degree</option>
          <option value="Ph.D">Ph.D</option>
          <option value="Prefer not to answer">Prefer not to answer</option>
        </select>

        <fieldset>
          <legend>How did you learn about the product?</legend>
          <input id="friend" type="radio" name="why-product" value="Through a friend">
          <label for="friend">Through a friend</label><br>
          <input id="Advertising" type="radio" name="why-product" value="Advertising">
          <label for="Advertising">Advertising</label><br>
          <input id="magazine" type="radio" name="why-product" value="magazine">
          <label for="magazine"> Read in a magazine </label><br>
          <input id="store" type="radio" name="why-product" value="store">
          <label for="store">Saw it in a store</label><br>
          <input id="Other" type="radio" name="why-product" value="Other">
          <label for="Other"> Other Text</label>
        </fieldset>

        <fieldset>
          <legend>Why did you purchase the product?</legend>
          <input id="Someone" type="checkbox" name="Someone" value="Someone">
          <label for="Someone">Someone asked for it </label><br>
          <input id="gift" type="checkbox" name="gift" value="gift">
          <label for="gift">Makes a great gift </label><br>
          <input id="Own-other" type="checkbox" name="Own-other" value="Own-other">
          <label for="Own-other">Own other (products) and wanted more </label><br>
          <input id="classic" type="checkbox" name="classic" value="classic">
          <label for="classic">It is a classic</label><br>
          <input id="Other-Text" type="checkbox" name="Other-Text" value="Other-Text">
          <label for="Other-Text">Other Text</label>
        </fieldset>
        <label for="textarea" id="review-label">Give a review of the product:</label>
        <textarea name="review-label" id="textarea" cols="70" rows="15"></textarea>
        <div class="submit">
          <input id="submit" type="submit" value="submit">
          <input type="reset" value="clear" id="clear">
        </div>
        <div class="clear"></div>
      </form>
      <footer>
        <p> created by Josephar</p>
      </footer>
    </div>
  </div>
</main>

</html>
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css2?family=Quicksand:wght@500&family=Smooch&display=swap");
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
main {
  width: 100%;
  background-image: url("https://lh3.googleusercontent.com/RBfHwgnU0UBRvssHYvsjAnvsc0o_v9KdQ0BTjxw1i7rd8kDixN3XV_rYg9fTET3mfD0lOLEZs0TtF33-1A");
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: scroll;
  min-height: 150vh;
  font-family: "Quicksand", sans-serif;
}
#continer {
  width: 100%;
  height: 100%;
  padding-top: 80px;
}
#form-continer {
  width: 60%;
  margin: 0 auto;
  padding-top: 5%;
  box-shadow: 0 0 51px 6px rgb(0 0 0 / 30%);
  border-radius: 20px;
}
#title,
#description {
  text-align: center;
  padding: 5px;
}
hr {
  width: 90%;
  margin: 10px auto;
}
#survey-form {
  padding: 10px;
}
#name-label,
#email-label,
#number-label,
#age-label,
#education-label,
#review-label,
#textarea {
  display: block;
  padding: 10px;
  margin: 10px 0;
}
input[type="radio"],
input[type="checkbox"] {
  margin: 0 20px 10px 5px;
}

input[type="text"],
input[type="email"],
input[type="number"] {
  width: 90%;
  padding: 10px;
  border-radius: 4px;
}
input,
textarea:not(.placeholder) {
  opacity: 0.7;
}
label {
  padding: 10px;
}
fieldset {
  margin-top: 10px;
  padding: 10px;
}
legend {
  padding: 10px;
  margin: 5px;
}

#dropdown,
#seconddown {
  width: 90%;
  padding: 10px;
  opacity: 0.7;
}
#textarea {
  width: 90%;
  margin: 0 auto;
  border-radius: 20px;
}
#clear,
#submit {
  padding: 15px;
  border-radius: 30px;
  min-width: 90px;
  font-weight: 500;
  font-size: 18px;
  border: none;
  color: white;
  background-color: rgb(106, 84, 156);
  box-shadow: 0 0 51px 6px rgb(0 0 0 / 30%);
  opacity: 0.7;
  float: right;
  margin: 20px;
  cursor: pointer;
}
#clear:hover,
#submit:hover {
  color: rgb(106, 84, 156);
  background-color: white;
}
section {
  width: 90%;
  height: auto;
}
.clear {
  clear: both;
}
footer p {
  text-align: center;
}

@media only screen and (max-width: 600px) {
  #form-continer {
    width: 100%;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console