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>

<body>
  <div id="background"> 
    <h1 id="title"> Westworld Feedback Form </h1>
    <p id="description"> We hope you enjoyed your time at the park. Please complete this form. </p>
    
   <form id="survey-form">
      <label class="form-labels" id="name-label">Name:</label>
        <input class="form-input" type="text" placeholder="First Name and Last Name" id="name" required/> 
     
     <label class="form-labels" id="email-label">Email:</label>
        <input class="form-input" type="email" placeholder="delores.abernathy@example.com" id="email" required/>
     
     <label class="form-labels" id="number-label">Age:</label>
        <input class="form-input" type="number" min="18" max="99" placeholder="Select or Enter your Age"  id="number" required/>
     
     <label class="form-labels"> How many times have you visited the park?</label>
        <select id="dropdown" class="form-input"  required>
          <option class="option-select" value="">--Please Select--</option>
          <option value="first">This was my First</option>
          <option value="two">Two</option>
          <option value="three">Three</option>
          <option value="four">Four</option>
          <option value="five">Five</option>
          <option value="five-plus">Over Five</option>
      </select>
     
      <fieldset class="field">
        <legend class="field-question"> How would you best describe Westworld? </legend>
         <label class="radio-labels">
            <input type="radio" name="radio-btn" value="fullSplendor" required/>
            I have never seen something so full of splendor</label>
         <label class="radio-labels">
            <input type="radio" name="radio-btn" value="seeBeauty" required/>
            I choose to see the beauty in that world</label>
         <label class="radio-labels">
            <input type="radio" name="radio-btn" value="doesntLook" required/>
            It didn't look like anything to me</label>
         <label class="radio-labels">
            <input type="radio" name="radio-btn" value="violentDelights" required />
            Those violent delights will have violent ends</label>
         <label class="radio-labels">
            <input type="radio" name="radio-btn" value="violentDelights" required/>
            Those violent delights will have violent ends</label>
      </fieldset>
      
      <fieldset class="field">
        <legend class="field-question"> Who were your favourite hosts?</legend>
        <label class ="radio-labels">
            <input type="checkbox" value="delores"> Delores Abernathy</label>
        <label class ="radio-labels">
            <input type="checkbox" value="teddy"> Teddy Flood </label>
        <label  class ="radio-labels">
            <input type="checkbox" value="maeve"> Maeve Millay </label>
        <label  class ="radio-labels">
            <input type="checkbox" value="hector"> Hector Escaton </label>
        <label  class ="radio-labels">
            <input type="checkbox" value="clementine"> Clementine Pennyfeather </label>
                <label  class ="radio-labels">
          <input type="checkbox" value="lawrence"> Lawrence Gonzales </label>
                <label class ="radio-labels">
          <input type="checkbox" value="armistice"> Armistice </label>
</fieldset>
     
     <label class="form-labels"> Additional Feedback </label>
       <textarea class="form-input-textarea" placeholder="Please enter any addition Feedback you may have"></textarea>
     <button id="submit" type="submit" class="btn-submit"> Submit </button>
    </form>
  </div>
</body>

    


              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Rye&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Stint+Ultra+Expanded&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@500&display=swap');

body, html {
  height: 100%;
  margin: 0;
}
#background{
  margin: 0;
  background-image: linear-gradient(0deg, rgba(5, 184, 255, 0.1), rgba(5, 184, 255, 0.3)), url("https://i.redd.it/5fwh681pvbwx.jpg");
  width: 100%;
  background-size: cover;
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-position: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index:2;
}
h1 {
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 3vh;
  font-family: 'Rye', cursive;
  font-size: 50px;
  color: #2d2d2d;
  display: flex;
  z-index: 1;
  text-align: center;
}
#description {
  margin-top: 1vh;
  font-family: 'Stint Ultra Expanded', cursive;
  font-size: 1.2em;
  color: #ffffff;
  font-weight: 600;
  margin-left: auto;
  margin-right: auto;
  z-index: 1;
  text-align: center;
}
#survey-form{
  border: 4px solid #ffffff;
  border-radius: 15px;
  width: 50%;
  height: auto;
  margin-top: 1vh;
  margin-bottom: 20vh;
  background-color: rgba(205, 237, 248, 0.6);
  padding-top: 3vh;
  display: block;
}
.form-input {
  margin-left: 5%;
  margin-right: 5%;
  margin-bottom: 5%;
  height: 2vh;
  margin-top: 2%;
  width: 90%;
  height: 3vh;
  border-radius: 8px;
  font-family: 'Noto Serif TC', serif;
  font-weight: 300;
}
.form-labels{
  margin-left: 5%;
  font-family: 'Stint Ultra Expanded', cursive;
  font-size: 1em;
  height: 2vh;
  color: rgb(3, 0, 117);
  display: flex;
}
.form-email {
  margin: 5%;
  margin-bottom: 3%;
  height: 2vh;
  margin-top: 2%;
  width: 90%;
  height: 3vh;
  border-radius: 8px;
}
.option-select{
  background-color: gray;
}
.form-visit{
  margin: 5%;
  margin-bottom: 3%;
  height: 2vh;
  margin-top: 2%;
  width: 90%;
  height: 4vh;
  border-radius: 8px;
}
.field-question{
  margin-left: -3%;
  font-family: 'Stint Ultra Expanded', cursive;
  font-size: 1em;
  color: rgb(3, 0, 117);
}
.field{
  margin-left: 5%;
  margin-right: 5%;
  margin-bottom: 3%;
  display: flex;
  flex-direction: column;
  border: 2px solid black;
}
.radio-labels{
  height: 3.5vh;
  font-family: 'Noto Serif TC', serif;
  font-size: 0.8em;
  font-weight: 300;
  display: flex;
  align-items: center;
}
.form-input-textarea{
  margin-left: 5%;
  margin-right: 5%;
  margin-bottom: 3%;
  height: 2vh;
  margin-top: 2%;
  min-width: 90%;
  max-width:90%;
  min-height: 3vh;
  border-radius: 8px;
}
.btn-submit{
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-top: -2%;
  margin-bottom: 2%;
  font-size: 1em;
  padding-top: 1.5%;
  padding-bottom: 1.5%;
  padding-left: 3%;
  padding-right: 3%;
  border-radius: 0.4em;
  background-color: rgba(5, 184, 255, 0.005);
  border-top: 3px solid white;
  border-left: 3px solid white;
  border-bottom: 3px solid gray;
  border-right: 3px solid gray;
  transition-duration: 0.5s;
}
.btn-submit:hover {
  background-color: rgba(5, 184, 255, 0.2);
  border-bottom: 3px solid white;
  border-right: 3px solid white;
  cursor: pointer;
}
@media (max-width: 1000px){
  #survey-form{
    width: 90%;
  }
}
@media (max-width: 500px){
  .radio-labels{
    height: 5vh;
  }
  .form-labels{
    margin-bottom: 6%;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console