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

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

<head>
  <link href="https://fonts.googleapis.com/css2?family=Baloo+Bhai+2:wght@600&display=swap" rel="stylesheet">
</head>

<div id="form">
  <header>
    <h1 id="title" class="header-content">Feedback Form</h1>
    <p id="description" class="header-content">We would love to hear your thoughts, suggestions, concerns or
      problems with anything so we can improve!</p>
  </header>
  <form action="" id="survey-form">
    <div class="group">
      <label for="name" id="name-label">Name</label>
      <input type="text" name="name" id="name" placeholder="Enter your Name" class="block" required>
    </div>
    <div class="group">
      <label for="email" id="email-label">Email</label>
      <input type="email" name="email" id="email" placeholder="Enter your Email" class="block" required>
    </div>
    <div class="group">
      <label for="dropdown">Gender</label>
      <select name="dropdown" id="dropdown" class="block">
        <option disabled selected>Select your Gender</option>
        <option value="male">Male</option>
        <option value="female">Female</option>
        <option value="other">Other </option>
      </select>
    </div>
    <div class="group">
      <label for="number" id="number-label">How would you like to rate us on scale of 1 to 10</label>
      <input type="number" name="rating" id="number" min="1" max="10" placeholder="1-10" class="block">
    </div>
    <div class="group">
      <fieldset id="fieldset">
        <legend>How likely are you to recommend our service to your friend or colleague?</legend>
        <label>
          <input type="radio" name="recommendation" value="very likely" class="radio">Very Likely</label>
        <label>
          <input type="radio" name="recommendation" value="somewhat likely" class="radio">
          Somewhat likely</label>

        <label>
          <input type="radio" name="recommendation" value="unsure" class="radio">
          Unsure</label>
        <label>
          <input type="radio" name="recommendation" value="not very likely" class="radio">
          Not very likely</label>
        <label>
          <input type="radio" name="recommendation" value="not likely" class="radio">Not likely</label>
      </fieldset>
    </div>
    <div class="group" id="checkbox">
      <p>Which platform do you use?</p>
      <label>
        <input type="checkbox" name="platform" value="windows" class="checkbox">
        Windows</label>
      <label>
        <input type="checkbox" name="platform" value="mac os" class="checkbox">
        Mac OS</label>
      <label>
        <input type="checkbox" name="platform" value="linux" class="checkbox">
        Linux</label>
      <label>
        <input type="checkbox" name="platform" value="other" class="checkbox">
        Other</label>
    </div>
    <div class="group">
      <label for="textarea">How can we improve our service?</label>
      <br>
      <textarea name="" id="textarea" cols="30" rows="10" placeholder="Describe your feedback!"></textarea>
    </div>
    <button class="group" id="submit">Submit</button>
  </form>
</div>
              
            
!

CSS

              
                * {
  box-sizing: border-box;
}

body {
  margin: 0px;
  padding: 0px;
  font-family: "Baloo Bhai 2", cursive;
}

body::before {
  content: "";
  position: fixed;
  top: 0px;
  left: 0px;
  right: 0px;
  bottom: 0px;
  height: 100vh;
  width: 100vw;
  z-index: -1;
  background: url("https://cdn.pixabay.com/photo/2016/10/11/21/43/geometric-1732847_1280.jpg")
    no-repeat center center/cover;
  background-color: #9e9efd;
  opacity: 0.7;
}

#title {
  margin: 0px;
  font-size: 5rem;
  text-align: center;
}

#description {
  font-size: 1.5rem;
  text-align: center;
  font-style: italic;
}

.header-content {
  margin-top: 0.25rem;
}

#survey-form {
  display: block;
  margin: 1.5rem auto;
  width: 60vw;
  border: 0.3rem solid white;
  background: white;
  font-size: 1.5rem;
  padding: 1rem;
  border-radius: 0.8rem;
  box-shadow: 0px 0px 5px 5px rgb(92, 92, 92);
  background-color: rgb(173 173 231 / 0.6);
}

.group {
  margin: 2px;
  padding: 10px;
}

.block {
  display: block;
  width: 100%;
  padding: 10px;
  border-radius: 10px;
}

textarea {
  height: 12rem;
  width: 100%;
  border-radius: 5px;
}

#submit {
  cursor: pointer;
  border-radius: 0.3rem;
  border: none;
  font-size: 1rem;
  width: 100%;
  display: block;
  margin: auto;
  background-color: rgb(93 143 255);
}

#submit:hover {
  background-color: #003a74;
}

#fieldset,
#checkbox {
  display: flex;
  flex-direction: column;
}

.radio,
.checkbox {
  display: inline-block;
  min-height: 1.2rem;
  min-width: 1.2rem;
}

#form [placeholder] {
  font-size: 1.2rem;
}

@media (max-width: 500px) {
  #title {
    font-size: 2rem;
    line-height: 1;
    margin: 0px;
  }
  #description {
    font-size: 0.8rem;
    margin-top: 0px;
  }
  #survey-form {
    width: 90vw;
    font-size: 1rem;
  }
  #form [placeholder] {
    font-size: 0.8rem;
  }
  .block{
    padding: 5px;
    border-radius: 8px;
  }
}
@media (max-width: 700px) {
  #title {
    font-size: 3rem;
  }
  #survey-form {
    width: 80vw;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console