Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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="main">
<header class="header">
  <h1 id="title">Food Truck Survey Form</h1>
<p id="description" class="description text-center">
  Thank you for telling us about your experience
  </p>
</header>
</div>
  
<form id="survey-form">
  
  <div class="form-group">
  <label id="name-label" for="name">Name</label>
<input type="text" required
       name="name"
       id="name" 
       class="form-control"
       placeholder="Enter your name"
  >
  </div>
    
  <div class="form-group">
    <label id="email-label" for="email">Email</label>
  <input 
         type="email" required
         name="email" 
         id="email"
         class="form-control"
         placeholder="Enter your Email"
  >
  </div>

  <div class="form-group">
    <label id="number-label" for="number">Age</label>
  <input 
         type="number" required
         name="age"
         id="number"
         min="10"
         max="110"
         class="form-control"
         placeholder="Age"
  >
  </div>

  
  
  <div class="form-group">
    <p>Which item should we add to our menu?</p>
<select id="dropdown" name="menu" class="form-control" required>
      <option disabled selected value>Select menu item</option>
      <option value="nachos">Gnarly Chicken Nachos</option>
      <option value="fish-taco">Fish & Chips Taco</option>
      <option value="man-sized-steak-burrito">Man-Sized Steak Burrito</option>
      <option value="crispy-carnitas-bowl">Crispy Carnitas Bowl</option>
</select>
  </div>
  
  <div class="form-group">
    <label id="location-label" for="location">Location of your visit</label>
    <label>
            <input
          name="location"
          value="banjo-bonanza"
          type="radio"
          class="input-radio"
          unchecked
        />Banjo Bonanza</label
      >
    <label>
  <input
         name="location"
         value="Skid Row"
         type="radio"
         class="input-radio"
         unchecked
         />Skid Row</label
  >
    <label>
  <input
         name="location"
         value="stanley-park"
         type="radio"
         class="input-radio"
         unchecked
         />Stanley Park</label
  >
  </div>
      <div class="form-group">
    <label 
           id="drinks-label" 
           for="drinks">Which drink(s) did you order with your meal?</label>
    <label>
            <input
          name="drinks"
          value="bottled-water"
          type="checkbox"
          class="input-checkbox"
          unchecked
        />Bottled Water</label
      >
        <label>
        <input
          name="drinks"
          value="soft-drink"
          type="checkbox"
          class="input-checkbox"
          unchecked
        />Soft Drink</label
      >
        <label>
        <input
          name="drinks"
          value="lemonade"
          type="checkbox"
          class="input-checkbox"
          unchecked
        />Lemonade</label
      >
        <label>
        <input
          name="drinks"
          value="rasberry-tea"
          type="checkbox"
          class="input-checkbox"
          unchecked
        />Rasberry Tea</label
      >
        <label>
        <input
          name="drinks"
          value="coffee"
          type="checkbox"
          class="input-checkbox"
          unchecked
        />Coffee</label
      >
  </div>
  
  <div class="form-group">
    <p>Any comments or suggestions?</p>
    <textarea
              id="comments"
              class="input-textarea"
              name="comments"
              placeholder="Leave your comment here ..."
              ></textarea>
  </div>
  
  <div class="form-group">
    <button type="submit" id="submit"
            class="submit-button">
      Submit
    </button>
  </div>      
    
</form>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Caveat');
@import url('https://fonts.googleapis.com/css?family=Montserrat+Subrayada');
@import url('https://fonts.googleapis.com/css?family=Markazi+Text');

*,
*::before,
*::after {
  box-sizing: border-box;
}

body::before{
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: -1;
  background-image: linear-gradient(
      115deg,
      rgba(10, 65, 160, 0.8),
      rgba(136, 136, 206, 0.5)
),
    url(https://images.pexels.com/photos/1766682/pexels-photo-1766682.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940;);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

#title {
  text-align: center;
  font-family: 'Montserrat Subrayada';
  color: #ffffff;
  font-size: 58px;
  padding: 10px;
  margin: auto;
}

#description {
  text-align: center;
  font-family: 'Caveat';
  font-weight: lighter;
  font-size: 38px;
  color: #ffffff;
  width: 60%;
  padding: 10px;
  margin: auto;
}

form {
  background: rgba(0, 0, 0, 0.5);
  padding: 2.5rem 0.625rem;
  border-radius: 0.25rem;
  width: 40%;
}

#survey-form {
  padding: 30px;
  margin: auto;
}

label {
  color: #ffffff;
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px;
  margin: auto;
  }

p {
  color: #ffffff;
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px;
  margin: auto;
}

.form-control {
  text-align: left;
  font-family: 'Markazi Text';
  font-size: 28px;
  color: #778899;
  padding: 5px;
  border-radius: 5px;
  border: thin solid #2B8CF4;
  width: 100%;
  margin: auto;
}

option {
  font-size: 20px;
  color: #4CAF50;
  background: #607D8B;
}

.input-radio,
.input-checkbox {
  width: 6%;
  margin: auto;
  background: #D0D9DB;
}

.input-textarea {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
  font-size: 28px;
  line-height: inherit;
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px;
  margin: auto;
  border-radius: 5px;
  color: #778899;
}

.submit-button {
  display: block;
  width: 100%;
  padding: 12px;
  margin: auto;
  font-family: inherit;
  font-size: inherit;
  text-align: center;
  border-radius: 5px;
  background: #FC9C4D;
  border: thin solid #333;
  cursor: url('data:image/x-icon;base64,AAACAAEAICAQAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAAAIAAAAAAAAAAAAAEAAAAAAAAAAAAAAA////AAEJCgAMzugAAOL/APSw/wAAxxsABQX/AACwxwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABIiIiIiIiIiIiIiIiIiIYGSIMzMzMzMzMzMzMzMziGRkgzODM4M4MzgzgzMzMzh2B4ODM4MzMzMzMzM4M4M4dkeDMzMzMzM4MzODMzMzOHZngzMzFVMzMiODNVEzMzhAZoMzMzIigzMzMyIjM4M4RgaDg4MyETODg4MRIzMzOGYEiDMzMhGDMzMzESMzg4hgRHgzMzODMzMzMzMzMzOHAAR3gzM4MzMzMzgzM4M4cAAABmg4MzM4M4MzODMzh2AAAABngzMzgzMzg4MzOGYAAAAABHiDMzMzMzMzOIYAAAAAAAZniIiIiIiIiIhGAAAAAAAABmRHd2d2R3R2YAAAAAAAAABEBmAERgBkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAiIAAAAAAAAAAAAAAAAAAAIiAAAAAAAAAAAAAAAAAAACIgAAAAAAAAAAAAAAAAAAAiIAAAAAAAAAAAAAAAAAAAIiAAAAAAAAAAAAAAAAAAACIiIiIAAAAAAAAAAAAAAAAiIiIiAAAAAAAAAAAAAAAAIiIiIgAAAAAAAAAAAAAAACAAAABAAAAAAAAAACAAAAAAAAAAAAAAAEAAAAAgAAAAIAAAAEAAAADgAAAB+AAAAfwAAAP+AAAP/gAAD/+AAB//yYz//////////////////////////////////////8f////H////x////8f////H////wD///8A////AP///w=='), auto;
}

.submit-button:hover {
  background: #D0D9DB;
}

.form-group {
  text-align: left;
  font-family: 'Markazi Text';
  font-size: 28px;
  padding: 5px;
}
              
            
!

JS

              
                
              
            
!
999px

Console