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

              
                <main id="main">
  <link href="https://fonts.googleapis.com/css?family=Pacifico" rel="stylesheet" type="text/css">
  <div id="container">
    <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet" type="text/css">
    <header>
      <h1 id="title">
        Survey Form
      </h1>
    <p id="description">Could you please fill out this form? <br>We'd love to learn more about your ice cream tastes!</br></p>
  </header>
    <form id="survey-form">
      <div class="form-group">
      <label id="name-label">Name</label>
      <input type="text" required id="name" name="name" placeholder="Name">
      <label id="email-label">Email</label>
      <input type="email" required id="email" name="email" placeholder="Email">
        <label id="number-label">Age</label>
      <input type="number" min="0" max="99" id="number" name="number" placeholder="Age">
      </div>
             <div class="form-group">
                  <p>Which ice cream flavour do you like best?</p>
        <select id="dropdown" name="role" required>
          <option>Make a selection</option>
          <option value="vanilla">vanilla</option>
          <option value="chocolate">chocolate</option>
          <option value="strawberry">strawberry</option>      
               </select>
          </div>
      <div class="form-group">
        <p>How many scoops of ice cream do you usually order?</p>
        <label class="radio-pos"> <input type="radio" name="favorite" value="1">1
        <label class="radio-pos"> <input type="radio" name="favorite" value="2">2
        <label class="radio-pos"> <input type="radio" name="favorite" value="3">3          
        </label>
          <p>Which new ice cream flavour would  you  like to see added to our menu?</p>
      </div>
          <div class="form-group">
            <label> <input type="checkbox" name="best" value="lemon-meringue">lemon meringue
            <label> <input type="checkbox" name="best" value="cherry-yoghurt">cherry yoghurt  
            <label> <input type="checkbox" name="best" value="banana-bread">banana bread                          </label>
          </div>
              <div class="form-group">
                <p>Do you have any comments or suggestions for us? </p>
                <textarea 
                          id="text-area"
                          name="comment"
                          placeholder="Please leave your thoughts here">
                </textarea>
              </div>
              <div class="form-group">
                <button id="submit" name="submit">Submit
                </button>
              </div>
       </form>
          </div>
  </main>
              
            
!

CSS

              
                body {background: url(http://roamaniac.com/wp-content/uploads/2022/01/ice-cream-865126_1920.jpg)}
header {background-color:  #FFF; margin: auto auto 2rem auto; padding: 1rem; border-radius: 10%; max-width: 50%;}
#title {text-align: center; font-family: pacifico;}
#description {text-align: center; font-family: roboto;}
#survey-form {text-align: center; font-family: roboto;
max-width: 50%; background-color: #FFF;
  padding: 1.5rem;
  border-radius: 10%;;
  margin: auto;}
.form-group {display: flex;
flex-direction: column;}
#container {
  display: flex;
  flex-direction: column;
  width: 75%;
  margin: auto;}
#name-label,
#email-label,
#number-label,
#drop-label {
  padding: 15px;
  }
#text-area
 {margin: 15px; height: 100px;}
#submit {margin: 15px; max-width: 50%; margin: auto;}
.radio-pos {display: flex;
flex-direction: column;
  align-items: center;
}

              
            
!

JS

              
                
              
            
!
999px

Console