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

Auto Save

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

              
                <div class="container">
  <header class="header">
    <h1 id="title" class="header__title">Survey Form</h1>
  </header>
  <main class="main">
    <div class="main__description">
      <p id="description">Please, fill de the following fields to sign up.</p>  
    </div>
    <form action="" id="survey-form" class="main__form">
<!--     name  -->
      <div class="main__form-group">
        <label for="name" id="name-label">Name: </label>
        <input type="text" required placeholder="Name..." id="name" class="main__form-input"/>
      </div>
<!--     email -->
      <div class="main__form-group">
        <label for="email" id="email-label">Email: </label>
        <input type="email" required placeholder="Email..." id="email" class="main__form-input"/>
      </div>
<!--     age -->
      <div class="main__form-group">
        <label for="age" id="number-label">Age:</label>
        <input type="number" required placeholder="From 18 to 99" min="18" max="99" id="number" class="main__form-input">
      </div>
<!--     question -->
      <div class="main__form-group">
        <label for="question">How did you know us?</label>
        <select id="dropdown" class="main__form-input">
          <option value="">Internet</option>      
          <option value="">TV spot</option>      
          <option value="">A friend</option>
        </select>
      </div>
<!--     genre -->
      <div class="main__form-group" style="text-left: center">
        <label for="genre" class="main__form-label">Choose you favourite genre: </label>
        <div id="genre">          
          <input type="radio" value="genre" name="genre" id="terror"/>
          <label for="terror">Terror</label>

          <input type="radio" value="genre" name="genre" id="comedy"/>
          <label for="comedy">Comedy</label>

          <input type="radio" value="genre" name="genre" id="romance"/>
          <label for="romance">Romance</label>
        </div>
      </div>   
<!--     interests    -->
      <div class="main__form-group">
        <label for="interests" class="main__form-label">Select your interests:</label>
        <div>
          <input type="checkbox" value="1" id="cooking"/>
          <label for="cooking">Cooking</label>
        </div>
        <div>  
          <input type="checkbox" value="2" id="fishing">
          <label for="fishing">Fishing</label>
        </div>
        <div>
          <input type="checkbox" value="3" id="photography">
          <label for="photography">Photography</label>
        </div>
        <div>
          <input type="checkbox" value="4" id="trekking" >
          <label for="trekking">Trekking</label>    
        </div>
      </div>
<!--     suggestion -->
      <div class="main__form-group">
        <label for="suggestion" class="main__form-label">Comments:</label>
        <textarea name="suggestion" cols="20" rows="10" placeholder="Write here..." id="sugestion"></textarea>
      </div>
<!--     submit button -->
      <div class="main__form-group">
        <input type="submit" value="Submit" id="submit" class="main__form-button"/>
      </div>
    </form>
  </main>
<!-- end main  -->
  <footer class="footer">
    <p class="footer__text">
      Made for freeCodeCamp.
    </p>
  </footer>
<!-- end footer -->
</div>
<!-- end container -->
              
            
!

CSS

              
                /* body */
/* *,
*::before,
*::after {
    box-sizing: border-box;
} */
body {
  background-color: #949494;
  font-family: 'Inconsolata', monospace;
  font-size: 1.2em;
}
/* container */
.container {
  max-width: 1000px;
  min-width: 300px;
  margin: 0 auto;
  background-color: hsl(60 70% 80%);
  display: grid;
  grid-template-rows: 100px 1fr auto;
  grid-template-columns: 1fr;
}
.header__title {
  text-align: center;
  font-weight: 700; 
}
/* header */
.header {
  background-color: #e45546; 
}
/* main */
.main {
  background-color: #44d4e4;
}
.main__description {
  text-align: center;
}
.main__form-group {
  margin: 20px 20%;
  display: grid;
}
.main__form-input {
  font-famili: 'inconsolata'
  height: 2em;
  margin: 0.5em 0;
  border: none;
  padding: 0.7em;
  border: 4px;
}
.main__form-label {
  margin-bottom: 10px;
}
.main__form-button { 
  background-color: #d4e444;
  font-family: 'Inconsolata', monospace;
  font-size: 1.2em; 
  padding: 10px 0 ;
  border: none;
  border-radius: 4px;
}
.main__form-button:hover {
  animation-name: colorify;
  animation-duration: 800ms;
  /*Maintaining the final state at end of animation*/
  animation-fill-mode: forwards; 
}
@keyframes colorify {
  100% {
    background-color: #e45546;
  }
}
/* footer */
.footer { 
  background-color: #5444e4;
}
.footer__text {
  text-align: center;
  color: white;
}
/* media querys */
/* @media (max-width: 350px) {
  .main__description {
    font-size: 1em;    
  }
  body {
    font-size: 1em;
  }
} */
              
            
!

JS

              
                
              
            
!
999px

Console