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>

<header>
  <h1 id="title">Survey Form</h1>
  <p id="description">lorem lorem ipsum ipsum impsum</p>
</header>

<main>
  <form action="" method="post" id="survey-form">
    <div class="row">
      <div class="col">
        <label id="name-label" for="name">Name *</label>
        <input id="name" type="text" name="name" placeholder="Jane" required>
     </div>
      <div class="col">
        <label for="sname">Surname *</label>
        <input id="sname" type="text" name="sname" placeholder="Doe" required>
      </div>
    </div>
    <div class="row">
      <div class="col">
        <label for="job">Current job role *</label>
        <input id="job" type="text" name="job" placeholder="Marketing Manager">
      </div>
      <div class="col">
        <label id="number-label" for="number">Years of work experience *</label>
        <input id="number" type="number" name="experience" min="0" max="30" placeholder="Enter ( 0 - 30 years)" required>
      </div>
    </div>
     <div class="row">
      <div class="col">
        <label id="email-label" for="email">Email *</label>
        <input id="email" type="email" name="email" placeholder="jane.doe@example.com" required>
       </div>
      <div class="col">
      <label for="dropdown">Choose your industry *</label>
      <select id="dropdown" name="industry" required>
        <option value="" disabled selected>Select</option>
        <option value="IT">Information Technology</option>
        <option value="hospitality">Hospitality</option>
        <option value="media">Media</option>
        <option value="healthcare">Healthcare</option>
        <option value="finance">Finance</option>
        <option value="marketing">Marketing &amp; Sales</option>
        <option value="other">other</option>
      </select>
     </div>
    </div>
    <div class="row">
      <div class="col-wrap">
        <p>How likley are you open to change career within the next year?</p> 
          <input id="very_likley" type="radio"  value="very_likely" name="job_change">
          <label for="very_likley">very likely</label>
          <input id="likley" type="radio" value="likely" name="job_change">
          <label for="likley">likely</label>
          <input id="unlikley" type="radio" value="unlikely" name="job_change">
          <label for="unlikley">unlikely</label>
          <input id="very_unlikley" type="radio" value="very_unlikely" name="job_change">
          <label for="very_unlikley">very unlikely</label>
      </div>
    </div>
   <div class="row">
     <div class="col-wrap">
      <p>Which of the following job satisfaction contributors are important to you?</p> 
        <input id="pay" type="checkbox" value="pay" name="job_satisfaction">
        <label for="pay">Benefits</label>
        <input id="job_security" type="checkbox" value="job_security" name="job_satisfaction">
        <label for="job_security">Job security</label>
        <input id="development" type="checkbox" value="development" name="job_satisfaction">
        <label for="development">Specific training </label>
        <input id="team" type="checkbox" value="team" name="job_satisfaction">
        <label for="team">Teamwork</label>  
     </div>
   </div>  
    <div class="row">
      <div class="col">
        <label for="comments">Your message</label>
        <textarea id="comments" name="comments" placeholder="Hi, I would like ..."></textarea>
       </div>
    </div>
      <div class="row">
        <button id="submit" type="submit">Submit</button>
    </div>
  </form>
</main>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Lato:wght@100;300;400;700&display=swap');

* {
  box-sizing: border-box;
}

body {
  width: 100vw;
  font-size: 16px;
  background-color: #5cdb95;
  color: #05386b;
  font-family: 'Lato', sans-serif;
  line-height: 1.5;
  margin: 0;
  overflow: auto;
}

::-webkit-scrollbar {
    display: none;
}

header, main {
  width: 55vw;
  margin: 0 auto;
}


header {
  text-align: center;
}

header h1 {
  margin-bottom: .5rem;
}

header #description {
  margin-top: 0;
}


form {
  display: flex;
  flex-direction: column;
  border: 2px solid #05386b;
  border-radius: 8%;
  background-color: #05386b;
  color: #edf5e1;
  max-width: 700px;
  padding: 2rem 2rem;
  margin: 0 auto;
}

.row {
  padding-bottom: .5rem;
  padding-top: .5rem;
  display: flex;
  width: 100%;
}

.row p {
  font-weight: bold;
  text-align: center;
}

form .col-wrap {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}


.col {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0.8rem;
}

label {
  margin-bottom: .5rem; 
  margin-right: 1rem;
  font-weight: bold;
}

form .row:nth-of-type(4) label,
form .row:nth-of-type(5) label {
  font-weight: 400;
}


input {
  padding: 1rem;
  font-size: 1rem;
  margin-left: 0;
  border: 2px solid #05386b;
  font-family: 'Lato', sans-serif;
  font-weight: 400;
}

select {
  height: 59.9%;
  color: #484848;
  padding: 0.5rem;
  font-size: 1rem;
  font-family: 'Lato', sans-serif;
  font-weight: 400;
  box-sizing: border-box;
}


textarea {
  height: 150px;
  padding: 0.5rem;
  font-size: 1rem;
  color: #ddd;
  font-family: 'Lato', sans-serif;
  font-weight: 400;
}

::placeholder {
  color: #484848;
}

button {
  width: 50%;
  margin-left: auto;
  margin-right: auto;
  height: 50px;
  background-color: #fdfd96;
  border: 0;
  padding: 0.5rem;
  font-size: 1.1rem;
  font-weight: bold;
  color: #05386b;
}

button:hover {
  font-weight: bold;
  color: #edf5e1;
  background-color: #5cdb95;
}

@media (max-width: 1075px) {
  form {
    border-radius: 0;
    padding: 1rem 1rem;
  }
  
  
header, main {
  width: 70vw;
}
  
  .row {
    flex-direction: column;
  }
  

select {
  height: 50px;
}
  
 
.row p {
  width: 80%;
  margin-left: auto;
  margin-right: auto;
  } 
  
  form .col-wrap {
    width: 80%;
  }
}
  
@media (max-width: 768px) {
  
header h1 {
  margin-bottom: 0;
}
  
  form {
    padding: .5rem .5rem;
  }
 
header, main {
  width: 75vw;
}
}

 
@media (max-width: 425px) {
  
  form {
    padding: .5rem .5rem;
  }
  
header, main {
  width: 95vw;
}
}
              
            
!

JS

              
                
              
            
!
999px

Console