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 class="container">
  <header class="haeder">
    <h1 id="title">CHL Code Camp Survey</h1>
    <p id="description">Please take a sometime to complete this short survey!</p>
  </header>

  <form id="survey-form">
    <div class="form-group">
      <label id="name-label" for="name">Name</label>
    <input id="name" type="text" placeholder="Your Full Name" required/>
    </div>
    
    <div class="form-group">
    <label id="email-label" for="email">E-mail</label>
    <input id="email" type="email" placeholder="E-mail address" required/>
    </div>
    
    <div class="form-group">
    <label id="number-label"  for="number">What is your age:</label>
    <input id="number" type="number" placeholder="Age" min="10" max="99"/>
    </div>
    
    <div class="form-group">
    <p>What Operating System are you currently using for coding?</p>
        <select id="dropdown" name="role" class="form-control" required>
          <option disabled selected value>Select Platform</option>
          <option value="windows">Windows</option>
          <option value="mac">Mac</option>
          <option value="Chrome">Chrome OS</option>
          <option value="other">Other</option>
        </select>
    </div>

    <div class="form-group">
    <p>How many days do you spend on code camp each week?</p>
    <label for="zero"> 
    <input id="zero" value="zero" class="input-radio" type="radio" name="days"> 0
  </label>
    <label for="one"> 
    <input id="one" value="one" class="input-radio" type="radio" name="days"> 1
  </label>
    <label for="two"> 
    <input id="two" value="two" type="radio" class="input-radio" name="days"> 2
  </label>
    <label for="three"> 
    <input id="three" value="three" class="input-radio" type="radio" name="days"> 3
  </label>
    <label for="four"> 
    <input id="four" value="four" class="input-radio" type="radio" name="days"> 4
  </label>
    <label for="five"> 
    <input id="five" value="five"  type="radio" class="input-radio" name="days"> 5
  </label>
    <label for="six"> 
    <input id="six" value="six"  type="radio" class="input-radio" name="days"> 6
  </label>
    <label for="seven"> 
    <input id="seven" value="seven"  type="radio" class="input-radio" name="days"> 7
  </label>
    </div>
    
    <div class="form-group">
    <p>How do you know about the code camp?</p>
    <label for="friends"><input id="friends" value="friends" class="input-checkbox" type="checkbox" name="source">       Friends</label>
    <label for="e-mail"><input id="e-mail" class="input-checkbox" value="e-mail"  type="checkbox" name="source">   E-mail</label>
    <label for="teacher"><input id="teacher" class="input-checkbox" value="teacher"  type="checkbox" name="source">  Teacher</label>
    <label for="social"><input id="social" class="input-checkbox" value="social"  type="checkbox" name="source"> Social Media</label>
    <label for="others"><input id="others" value="others" class="input-checkbox"  type="checkbox" name="source"> Others</label>
    </div>

    <div class="form-group">
     <p>How do we improve? Please provide comments:</p>
      <textarea
        id="comments"
        class="input-textarea"
        name="comment"
        placeholder="Enter your comment here..."
      ></textarea>
    </div>
    
    <div class="form-group">
      <button type="submit" id="submit" class="submit-button" action="mailto:jleun006@fiu.edu">
        Submit
      </button>
    </div>
    
  </form>
</div>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Poppins:200i,400&display=swap');

/* color variables*/
:root {
   --color-white: #f3f3f3;
  --color-emerald: #009B77;
  --color-mimosa: #EFC050;
  --color-blue-izis: RGB(91, 94, 166);
  --color-green: #37af65;
}

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

body {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-white);
  margin: 0;
}

/* mobile friendly alternative to using background-attachment: fixed */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: -1;
  background: var(--color-blue-izis);
  background-image: linear-gradient(
      115deg,
      RGB(127, 205, 205,0.7),
      RGB(91, 94, 166, 0.8)
  ), url(https://images.unsplash.com/photo-1593720219276-0b1eacd0aef4?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=2000&fit=max&ixid=eyJhcHBfaWQiOjExNzczfQ);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

h1 {
  font-weight: 400;
  line-height: 1.2;
  margin-top: 0;
  margin-bottom: 0.5rem;
  text-align: center;
}

p {
  font-size: 1.125rem;
    margin-top: 0;
  margin-bottom: 0.5rem;
}

label {
  display: flex;
  align-items: center;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

input,
button,
select,
textarea {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  display: inline-block;
  margin-right: 0.3rem;
}

button {
  border: none;
}

.container {
  width: 100%;
  margin: 3.125rem auto 0 auto;
}

@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
}

.header {
  padding: 0 0.625rem;
  margin-bottom: 1.875rem;
}

@media (min-width: 768px) {
  .header {
    padding: 0.5rem 0.5rem 0.5rem 0.5rem ;
  }
}

#description {
  font-style: italic;
  font-weight: 200;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
  text-align: center;
}

/* form */

form {
  background: var(--color-emerald);
  padding: 2.5rem 0.625rem;
  border-radius: 1rem;
  box-shadow: 3px 3px 5px 0px black;
}

@media (min-width: 480px) {
  form {
    padding: 2.5rem;
  }
}
/* .input-radio,
.input-checkbox {
  display: inline-block;
  margin-right: 0.3rem;
} */

.form-group {
  margin: 0 auto 1.25rem auto;
  padding: 0.25rem;
}

.input-textarea {
  min-height: 120px;
  width: 100%;
  padding: 0.625rem;
  resize: vertical;
}

.submit-button {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background: var(--color-mimosa);
  color: inherit;
  border-radius: 2px;
  cursor: pointer;
}


              
            
!

JS

              
                
              
            
!
999px

Console