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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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>
<link href="https://fonts.googleapis.com/css?family=Quicksand:400,700&display=swap" rel="stylesheet">

<div class="container">

  <div class="header"><h1 id="title">My FreeCodeCamp Survey Form</h1></div><!-- header -->
  <div class="description"><p id="description">This sample form is part of my ongoing studies with the <a href="https://www.freecodecamp.org/" target="_blank">FreeCodeCamp project</a>. After learning about the basics of HTML and CSS and how it relates to Responsive Web Design, I am encouraged to test out my skills with real life projects.</p></div><!-- description -->

    <form id="survey-form">
        <label for="name" id="name-label">Name:</label>
        <input type="text" id="name" name="name" placeholder="Enter your name" required>
        <label for="email" id="email-label">Email:</label>
        <input type="email" id="email" name="email" placeholder="Enter your email" required>
        <label for="number" id="number-label">Age:</label>
        <input type="number" id="number" name="age" min="3" max="130" placeholder="Enter your age">
        <label for="dropdown" class="strongestside">Enter your strongest side</label>
      <select id="dropdown" name="strongest_side">
        <option value="css">HTML</option>  
        <option value="css">CSS</option>  
        <option value="css">JavaScript</option>  
      </select>  
      <fieldset>
        <legend>Your main purpose for learning web development</legend>
        <input type="radio" id="nerd" name="purpose" value="nerd">
        <label for="nerd">I´m just a nerd</label><br>
        <input type="radio" id="career" name="purpose" value="career">
        <label for="nerd">I wish to reignite my career</label><br>
        <input type="radio" id="mental" name="purpose" value="mental">
        <label for="nerd">I like the mental puzzles</label><br>
        <input type="radio" id="money" name="purpose" value="money">
        <label for="nerd">I like the money</label><br>
      </fieldset>
      <hr>
      <fieldset>
        <legend>Previous work experience</legend>
        <input type="checkbox" id="design" name="design" value="Design">
        <label for="design">Design</label><br>
        <input type="checkbox" id="administration" name="administration" value="Administration">
        <label for="administration">Administration</label><br>
        <input type="checkbox" id="marketing" name="marketing" value="Marketing">
        <label for="marketing">Marketing</label><br>
        <input type="checkbox" id="warehouse" name="warehouse" value="Warehouse">
        <label for="warehouse">Warehouse</label><br>
        <input type="checkbox" id="food" name="food" value="Food">
        <label for="food">Food industry</label><br>
        <input type="checkbox" id="sales" name="sales" value="Sales">
        <label for="sales">Sales</label><br>
        <input type="checkbox" id="other" name="other" value="Other">
        <label for="other">Other</label><br>
      </fieldset>
      <label for="comments" class="comments">Additional comments</label>
      <textarea id="comments" rows="4"></textarea>
      <button type="submit" id="submit">Submit</button>
    </form>
</div><!-- container -->
              
            
!

CSS

              
                html {
  box-sizing: border-box;
}
*, *:before, *:after {
  box-sizing: inherit;
}
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: -1;
  background-image: linear-gradient(
      -180deg,
      rgba(0, 0, 0, 0.95),
      rgba(89, 151, 88, 0.3)
    ), url("https://jjberg83.github.io/myImageLibrary/coffee-writing-computer-blogging-34600.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}
.container {
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  width: 80%;
  height: 900px;
  font-family: 'Quicksand', sans-serif;
  color: white;
}
a {
  color: #fbd479;
}
a:hover {
  color: #c5af7a;
}
.header, .description {
  text-align: center;
}
.header {
  margin-top: 10px;
}
.description {
  margin-bottom: 20px;
}
fieldset {
  border: 0;
  margin-left: -15px;
}
fieldset label {
  color: rgba(255, 255, 255, 0.6);
}
#survey-form {
  background: rgba(68, 61, 86, 0.8);
  border-radius: 30px;
  padding: 30px;
  border: 15px solid rgba(0, 0, 0, 0.25);
  box-shadow: 0 10px 40px #000;
}
input[type=text], input[type=email], input[type=number], select, textarea {
  width: 100%;
  padding: 12px 10px;
  margin-top: 10px;;
  display: inline-block;
  border: none;
  border-radius: 4px;
  box-sizing: border-box;
}
fieldset, #dropdown, #comments,#name, #email, #number {
  margin-bottom: 20px;
}
#name-label, #email-label, #number-label, .strongestside, legend, .comments {
  font-weight: bold;
}
button {
  background: #fbd479;
  border-radius: 10px;
  padding: 15px;
  font-weight: bold;
  font-size: 26px;
  width: 100%;
  color: rgb(68, 61, 86);
  border-width: 0;
  margin-top: 10px;
}
button:hover {
  background: #feebc5;
}
@media (min-width: 800px) {
  .container {
    width: 750px;
  }
  .description, #survey-form {
    font-size: 20px;
  }
}
@media (min-width: 550px) {
  #name, #email, #number, select{
    font-size: 16px;
  }
}
@media (max-width: 450px) {
  #survey-form {
    border-width: 8px;
  }
}
@media (max-width: 550px) {
  button {
    font-size: 16px;
  }
}
@media (max-width: 300px) {
  .container {
    width: 180px;
    font-size: 13px;
  }
  #survey-form {
    padding: 15px;
  }
  .form-section {
    margin-bottom: 10px;
  }
  fieldset {
    margin-left: -12px;;
  }
}

              
            
!

JS

              
                

              
            
!
999px

Console