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>
<div id="block">
  <h1 id="title">CofFEe for all. Survey Form</h1>
  <p id="description">Thank you for taking this survey. You help us to make our coffee better</p>
</div>
<form id="survey-form">
  <div>
    <label for="name" id="name-label">Name<span style="color:red">*</span></label>
    <input id="name" type="text" placeholder="Please enter your name" name="name" required>
  </div>
  <div>
    <label for="email" id="email-label">Email<span style="color:red">*</span></label>
    <input id="email" type="email" placeholder="Please enter your email" name="email" required>
  </div>
  <div>
    <label for="number" id="number-label">Cups of coffee per day (optional)</label>
    <input id="number" type="number" placeholder="Please enter number of cups" name="number" min="0" max="10">
  </div>
  <div>
    <p class="names">What coffee do you like?</p>
    <select name="dropdown" id="dropdown">
      <option value="">--Please choose your coffee--</option>
      <option value="cappuccino">cappuccino</option>
      <option value="americano">americano</option>
      <option value="espresso">espresso</option>
      <option value="latte">latte</option>
      <option value="only_Starbucks">only Starbucks</option>
      <option value="goldfish">freddo</option>
    </select>
  </div>
  <div>
    <p class="names">How do you prefer your coffee?</p>
    <fieldset id="adding1">
      <input type="radio" id="hot" name="hot'n'cold" value="hot">
      <label id="label-hot" for="hot">Hot</label>
      <input type="radio" id="cold" name="hot'n'cold" value="cold">
      <label id="label-cold" for="cold">Cold</label>
    </fieldset>
  </div>
  <div>
    <p class="names">How do you like your coffee?</p>
    <fieldset id="adding2">
      <input type="checkbox" id="sweet" name="something" value="with_sugar">
      <label id="sweet-label" for="sweet">with sugar</label>
      <input type="checkbox" id="milk" name="something" value="with_milk">
      <label id="milk-label" for="milk">with milk</label>
      <input type="checkbox" id="stevia" name="something" value="with_stevia">
      <label id="stevia-label" for="stevia">with stevia</label>
      <input type="checkbox" id="black" name="something" value="black">
      <label id="black-label" for="black">black</label>
      <input type="checkbox" id="decaffeinated" name="something" value="without caffeine">
      <label id="decaffeinated-label" for="decaffeinated">decaf</label>
    </fieldset>
  </div>
  <div>
    <label id="comment-label" for="comment">Tell us what do you think about our coffee:</label>
    <textarea id="comment" name="comment" rows="5" cols="33" placeholder="I like it (or not) because..."></textarea>
  </div>
  <button type="submit" id="submit">Submit your answers</button>
</form>
<footer>
  <p>Made by <a href="https://github.com/dieplumpe" id="tribute-link" target="_blank"><u>dieplumpe</u></a></p>
</footer>
              
            
!

CSS

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

body {
  background-image: url("https://www.dropbox.com/s/j8g45xy9e46zkv4/bitmap2.png?dl=0&raw=1");
  width: 100%;
  font-family: "Montserrat", sans-serif;
  font-weight: bold;
  padding: 0;
  margin: 0;
  text-align: center;
  color: #000000;
  height: 100%;
  background-size: cover;
  background-position: center;
  overflow-x: hidden;
}
@media screen and (max-width: 799px) {
  body {
    background-image: url("https://www.dropbox.com/s/fgay2e7xgtusz40/bitmap2%20%282%29.png?dl=0&raw=1");
  }
}

#block {
  margin: auto;
  max-width: 50%;
  line-height: 1.5;
  margin-bottom: 3%;
}
#title {
  font-family: "Bangers", cursive;
  font-size: 70px;
}
#description {
  font-size: 30px;
}
@media screen and (max-width: 1300px) and (min-width: 800px) {
  #block {
    margin: auto;
    max-width: 70%;
    line-height: 1.5;
    margin-bottom: 2%;
  }
  #title {
    font-size: 50px;
  }
}
@media screen and (max-width: 799px) {
  #block {
    margin: auto;
    max-width: 90%;
    line-height: 1.5;
    margin-bottom: 2%;
  }
  #title {
    font-size: 30px;
  }
}

@media screen and (max-width: 1300px) {
  #description {
    font-size: 20px;
  }
}
#survey-form {
  border-radius: 1%;
  background: rgba(225, 207, 194, 0.6);
  margin: 0em 25% 5% 25%;
  padding: 2% 5% 3% 5%;
}
@media screen and (max-width: 1300px) and (min-width: 800px) {
  #survey-form {
    margin: 0em 25% 4% 25%;
    font-size: 20px;
  }
}
@media screen and (max-width: 799px) {
  #survey-form {
    margin: 3% 0 4% 0;
    font-size: 16px;
  }
}
input:focus {
  color: red;
}
label {
  display: block;
  text-align: left;
  font-family: inherit;
  line-height: inherit;
  margin: 2% 0 2% 0;
}
#number-label,
#email-label,
#name-label,
#comment-label {
  font-size: 22px;
}

input,
select,
button {
  width: 100%;
  height: 2em;
  font-size: 16px;
  margin: 3% 5% 3% 0;
  letter-spacing: 0.5px;
}
select {
  opacity: 60%;
}
@media screen and (max-width: 1300px) and (min-width: 800px) {
  input,
  select,
  button {
    font-size: 14px;
  }
}
@media screen and (max-width: 799px) {
  input,
  select,
  button {
    width: 80%;
    margin: auto;
    font-size: 12px;
  }
}
#comment {
  width: 100%;
  height: 20%;
  font-size: 16px;
  margin: 5% auto 3% auto;
}
@media screen and (max-width: 1300px) {
  #number-label,
  #email-label,
  #name-label,
  #comment-label {
    font-size: 16px;
  }
  #comment {
    width: 75%;
    height: 20%;
    font-size: 12px;
    margin: 0 auto;
  }
}
::placeholder {
  color: hsl(25, 34%, 25%);
  font-weight: 550;
  font-family: "Bangers", cursive;
  font-size: 16px;
  opacity: 60%;
  letter-spacing: 0.5px;
}
@media screen and (max-width: 1300px) and (min-width: 800px) {
  ::placeholder {
    font-size: 14px;
  }
}
@media screen and (max-width: 799px) {
  ::placeholder {
    font-size: 12px;
  }
}
#dropdown {
  color: hsl(25, 34%, 25%);
  font-weight: 550;
  font-family: "Bangers", cursive;
}
#adding1 {
  width: 100%;
  height: 50%;
  margin: 3% 5% 3% 0;
  display: grid;
  max-width: 100%;
  grid-template-rows: 1em 1em;
  grid-template-columns: 40%;
  gap: 4%;
  padding: 0.4rem 4em 0.4rem 4em;
  border: none;
  align-self: start;
  }
#hot,
#label-hot {
  grid-row: 1 / 2;
  grid-column: 1 / 2;
  font-size: 18px;
  border: 0;
  height: 18px;
}
#cold,
#label-cold {
  grid-row: 3 / 4;
  grid-column: 1 / 2;
  font-size: 18px;
  border: 0;
  height: 18px;
}

@media screen and (max-width: 1300px) {
  #hot,
  #label-hot, 
  #cold,
  #label-cold {
  font-size: 14px;
  height: 14px;
  }
  }
#adding2 {
  width: 100%;
  height: 50%;
  margin: 3% 5% 3% 0%;
  display: grid;
  width: 100%;
  grid-template-rows: 2em 2em 2em;
  grid-template-columns: 50% 50%;
  column-gap: 1px;
  row-gap: 10%;
  padding: 3% 0% 3% 5%;
  border: none;
  align-self: start;
}
#sweet,
#sweet-label {
  grid-row: 1 / 2;
  grid-column: 1 / 2;
  font-size: 18px;
  border: 0;
  height: 18px;
  width: 100%;
 }
#milk,
#milk-label {
  grid-row: 1 / 2;
  grid-column: 2 / 3;
  font-size: 18px;
  border: 0;
  height: 18px;
  width: 100%;
  
}
#stevia, #milk, #sweet, #black, #decaffeinated {
  margin-right: 18em;
}
#stevia,
#stevia-label {
  grid-row: 2 / 3;
  grid-column: 1 / 2;
  font-size: 18px;
  border: 0;
  height: 18px;
  width: 100%;
}
#black,
#black-label {
  grid-row: 2 / 3;
  grid-column: 2 / 2;
  font-size: 18px;
  border: 0;
  height: 18px;
  width: 100%;
}
#decaffeinated,
#decaffeinated-label {
  grid-row: 3 / 4;
  grid-column: 1 / 2;
  font-size: 18px;
  border: 0;
  height: 18px;
  width: 100%;
}

@media screen and (max-width: 1300px) {
  #adding2 {
    grid-template-columns: 50% 50%;
  }
  #sweet,
  #sweet-label, #milk,
  #milk-label, #stevia,
  #stevia-label, #black,
  #black-label, #decaffeinated,
  #decaffeinated-label {
  font-size: 14px;
  border: 0;
  height: 14px;
  }
  #stevia, #milk, #sweet, #black, #decaffeinated {
  margin-right: 14em;
}
  }
  
.names {
  font-size: 22px;
  text-align: left;
  margin: 0.8rem 0 0.8rem 0;
  font-family: inherit;
  line-height: inherit;
}
@media screen and (max-width: 1300px) {
  .names {
    font-size: 16px;
  }
}
#submit {
  cursor: pointer;
  color: hsl(25, 34%, 25%);
  font-weight: 550;
  font-family: "Bangers", cursive;
  font-size: 22px;
  max-width: 100%;
  margin: 5% auto 3% auto;
}
footer {
  margin: 0 auto;
}
@media screen and (max-width: 1300px) {
  footer {
    font-size: 12px;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console