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>

<!-- 

Hello Camper!

For now, the test suite only works in Chrome! Please read the README below in the JS Editor before beginning. Feel free to delete this message once you have read it. Good luck and Happy Coding! 

- The freeCodeCamp Team 

-->
<html>
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    </head>
<body>
<h1 id="title" class="text-center">Your Favorite Ice Cream Shop</h1>
  <h1 class='text-center'>Survey Form</h1>
 <div id="container" class='container'>
<p id="description" class="text-center">Please let us know how we can do better...</p>

  <form id="survey-form">
   <label id="name-label" for="Name">* Name:</label>
    <input id="name" type="text" placeholder="Enter your name" class="form-control" required/>
    <label id="email-label" for="Email">* Email:</label>
    <input id="email" type="email" placeholder="Enter your email" class="form-control" required/>
    <label id="number-label" for="Number">* Age:</label>
    <input id="number" type="number" placeholder="Age" min="18" max="150" class="form-control" required/>
    <label for="Visit">How was your visit?</label>
    <select id="dropdown">
      <option>Select One</option>
      <option value="Poor">Poor</option>
      <option value="Good">Good</option>
      <option value="Excellent">Excellent</option>
      </select>
    <label for="LikedMost">What did you like most about your visit?</label>
    <textarea rows="5" class="form-control"></textarea>
    <label for="Improvements">What can we improve on? (Check all that apply.)</label>
    <div id="check-boxes" name="improvements">
    <div class="form-check">
  <label class="form-check-label">
    <input type="radio" class="form-check-input" value="More ice cream flavors" name="options">More ice cream flavors
  </label>
</div>
    <div class="form-check">
  <label class="form-check-label">
    <input type="radio" class="form-check-input" value="Better ice cream cones" name="options">Better ice cream cones
  </label>
    </div>
    <div class="form-check">
  <label class="form-check-label">
    <input type="radio" class="form-check-input" value="Less ice cream flavors" name="options">Less ice cream flavors (now who would want that??!!)
  </label>
      </div>
<div class="form-check">
  <label class="form-check-label">
    <input type="radio" class="form-check-input" value="Better customer service" name="options">Better customer service
  </label>
</div>
<div class="form-check">
  <label class="form-check-label">
    <input type="radio" class="form-check-input" value="Cleanliness" name="options">Cleanliness
  </label>
      </div>
<div class="form-check">
  <label class="form-check-label">
    <input type="radio" class="form-check-input" value="Other" name="options">Other (please explain below)
  </label>
</div>
    </div>
 <label for="personal-preferences" id="preferences">For this surveys purpose only, please tell us what your favorite ice cream flavors are: (check all that apply)</label> 
    <div id="second-check-boxes">
 <div class="form-check">
  <input class="form-check-input" type="checkbox" value="Vanilla">
  <label class="form-check-label" for="defaultCheck1">
    Vanilla
  </label>
</div>
<div class="form-check">
  <input class="form-check-input" type="checkbox" value="Chocolate">
  <label class="form-check-label" for="defaultCheck2">
    Chocolate
  </label>
</div>
    <div class="form-check">
  <input class="form-check-input" type="checkbox" value="Strawberry">
  <label class="form-check-label" for="defaultCheck3">
    Strawberry
  </label>
</div>
    <div class="form-check">
  <input class="form-check-input" type="checkbox" value="Chocolate-Chip Mint">
  <label class="form-check-label" for="defaultCheck4">
    Chocolate-Chip Mint
  </label>
</div>
    <div class="form-check">
  <input class="form-check-input" type="checkbox" value="Cookies & Cream">
  <label class="form-check-label" for="defaultCheck5">
    Cookies & Cream
  </label>
</div>
    <div class="form-check">
  <input class="form-check-input" type="checkbox" value="Neopolitan">
  <label class="form-check-label" for="defaultCheck6">
    Neopolitan
  </label>
</div>
    <div class="form-check">
  <input class="form-check-input" type="checkbox" value="Birthday Cake">
  <label class="form-check-label" for="defaultCheck7">
    Birthday Cake
  </label>
</div>
    <div class="form-check">
  <input class="form-check-input" type="checkbox" value="Pistachio">
  <label class="form-check-label" for="defaultCheck8">
    Pistachio
  </label>
</div>
    <div class="form-check">
  <input class="form-check-input" type="checkbox" value="Other">
  <label class="form-check-label" for="defaultCheck9">
    Other flavors (please explain in the comments below)
  </label>
</div>
    </div>
    
    <label id="comments" for="comments">Please feel free to share any additional comments or suggestions here!</label>
    <textarea id="comments-box" rows="5" placeholder="Additional comments..." class="form-control"></textarea>
    <button id="submit" type="submit" class="btn btn-default" onclick="submit()">Submit</button>
   
    </div>
  </form>
  </div>
  </body>
  </html>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Merienda');

body {
  background-color: #CE9FFC;
  margin: 0 auto;
}
h1 {
  margin: 25px 0px 25px 0px;
  font-family: 'Merienda', cursive;
}
#container {
  background-color: white;
  padding: 20px 20px 20px 20px;
  max-width: 800px;
  min-height: 600px;
  border-radius: 15px;
  box-shadow: 5px 2px gray;
}
form {
  display: grid;
  grid-template-columns: 40% 50%; 
  grid-template-rows: repeat(12, 45px);
  justify-content: center;
  grid-column-gap: 15px;
  grid-row-gap: 20px;
}
label {
  justify-self: end;
}
input {
  justify-self: start;
}
textarea {
  justify-self: stretch;
}
#check-boxes {
  grid-row: 6;
  grid-column: 2;
}
#second-check-boxes {
  grid-row: 9;
  grid-column: 2;
}
#preferences {
  grid-row: 9;
  grid-column: 1;
}
#comments {
  grid-row: 13;
  grid-column: 1;
}
#comments-box {
  grid-row: 13;
  grid-column: 2;
}
#submit {
  grid-row: 14;
  grid-column: 2;
}
              
            
!

JS

              
                // !! IMPORTANT README:

// You may add additional external JS and CSS as needed to complete the project, however the current external resource MUST remain in place for the tests to work. BABEL must also be left in place. 

/***********
INSTRUCTIONS:
  - Select the project you would 
    like to complete from the dropdown 
    menu.
  - Click the "RUN TESTS" button to
    run the tests against the blank 
    pen.
  - Click the "TESTS" button to see 
    the individual test cases. 
    (should all be failing at first)
  - Start coding! As you fulfill each
    test case, you will see them go   
    from red to green.
  - As you start to build out your 
    project, when tests are failing, 
    you should get helpful errors 
    along the way!
    ************/

// PLEASE NOTE: Adding global style rules using the * selector, or by adding rules to body {..} or html {..}, or to all elements within body or html, i.e. h1 {..}, has the potential to pollute the test suite's CSS. Try adding: * { color: red }, for a quick example!

// Once you have read the above messages, you can delete all comments. 

function submit(){
  alert("Thank you for taking this brief survey. None of your answers have been stored. This is simply a project for educational purposes.");
}

              
            
!
999px

Console