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>

<!-- 

Hello Camper!

For now, the test suite only works in Chrome! Please read the README below in the JS Editor before beginning. Feel free to delete this message once you have read it. Good luck and Happy Coding! 

- The freeCodeCamp Team 

-->
<body>
<div id="top">
  <h1 id="title">FreeCodeCamp Survey</h1>
</div>
<p id="description">Please take a moment to fill out this survey and help us improve our website.</p>
<form id="survey-form">
  <label id="name-label" for="name">Name:</label>
  <input type="text" id="name" name="name" class="form-content" placeholder="Enter your name" required>
  <p><label id="email-label" for="email">Email:</label>
      <input type="email" pattern="[^ @]*@[^ @]*" id="email" name="email" class="form-content" placeholder="Enter your email" required></p>
  <p><label id="number-label" for="number">Age:</label>
      <input type="number" id="number" name="number" class="form-content" placeholder="(optional)" min="1" max="100"></p>
<p><div class="dropdown">
  <label for="dropdown">What is your current experience level?</label>
     <select id="dropdown" class="dropdown-menu">
        <option value="beginner">Beginner</option>
        <option value="competent">Competent</option>
        <option value="proficient">Proficient</option>
       <option value="expert">Expert</option>
      </select>         
    </div>
<p><label for="radiobtn1"> 
  Would you recommend FreeCodeCamp to a friend?
  <p><input id="radiobtn1" type="radio" name="recommend" value="yes">Yes 
</label>
<label for="radiobtn2"> 
  <input id="radiobtn2" type="radio" name="recommend" value="maybe">Maybe 
</label>
<label for="radiobtn3"> 
  <input id="radiobtn3" type="radio" name="recommend" value="no">No 
  </label></p>
<p><label>Why or why not?</label>
 <textarea id="whyornot" name="whyornot" placeholder="Please type here"></textarea></p>
  <p>What are your favorite topics to learn on FCC.ORG?</p>
<label>
  <input class="checkbox-code" type="checkbox" name="favorite" value="WebDesign"> Web Design</label>
<label>
  <input class="checkbox-code" type="checkbox" name="favorite" value="JS&DS"> Javascript & Data Structures</label>
<label>
  <input class="checkbox-code" type="checkbox" name="favorite" value="DataV"> Data Visualization</label>
<label>
  <input class= "checkbox-code" type="checkbox" name="favorite" value="APIs&Micro"> APIs and Microservices</label>
<label>
  <input class="checkbox-code" type="checkbox" name="api" value="QA"> Quality Assurance</label>
<label>
  <input class="checkbox-code" type="checkbox" name="favorite" value="SCwithPython"> Scientific Computing with Python</label>
<label>
  <input class="checkbox-code" type="checkbox" name="dataanalysis" value="DAwithPython"> Data Analysis with Python</label>
<label>
  <input class="checkbox-code" type="checkbox" name="favorite" value="IS"> Information Security</label>
<label>
  <input class="checkbox-code" type="checkbox" name="favorite" value="MLwithPython"> Machine Learning with Python</label>
<label>
  <input class="checkbox-code" type="checkbox" name="favorite" value="favorite"> Coding Interview Prep</label>
  <p><button type="submit" id="submit" class="button">Submit</button></p>
  </form>
</body>
              
            
!

CSS

              
                body {
  font-size: 16px;
  font-family: Verdana, sans-serif;
  background: repeating-linear-gradient(
  45deg, #eeeeee, #e5e5e5, #eeeeee 10px, #e5e5e5 10px);
}
#top {
  display: block;
  justify-content: center;
  margin: auto;
  width: 40%;
  font-family: Impact, fantasy;
  
}
#title {
  font-size: 30px;
  letter-spacing: 3px;
  color: #000000;
  padding: 10px;
  text-align: center;
  border: 1px solid black;
  background: linear-gradient(90deg, #c4ffd4, #decbf7, #d4e9f5);
}
#description {
  font-size: 18px;
  font-style: italic;
  text-align: center;
  font-family: Andale Mono, monospace;
}
#survey-form{
  text-align: left;
  background-color: #e1d3f8;
  border: 1px solid #000000;
  width: 40%;
  height: 100%;
  padding: 20px;
  margin: auto;
}
.form-content {
  width: 100%;
  text-align: left;
  font-size: 16px;
  font-family: Verdana;
}
.dropdown-menu {
  font-size: 16px;
  font-family: Verdana;
  width: 100%;
}
#whyornot {
  font-size: 16px;
  font-family: Verdana;
  width: 100%;
}
.button
{
  color: #000000;
  font-size: 25px;
  font-family: Impact, fantasy;
  width: 100%;
  padding: 10px;
  background: linear-gradient(90deg, #c4ffd4, #decbf7, #d4e9f5);
  letter-spacing: 3px;
  cursor: pointer;
}
.button:hover {
  background: repeating-linear-gradient(
  45deg, #eeeeee, #e5e5e5, #eeeeee 10px, #e5e5e5 10px);
}
label {
  display: block;
}
              
            
!

JS

              
                // !! IMPORTANT README:

// You may add additional external JS and CSS as needed to complete the project, however the current external resource MUST remain in place for the tests to work. BABEL must also be left in place. 

/***********
INSTRUCTIONS:
  - Select the project you would 
    like to complete from the dropdown 
    menu.
  - Click the "RUN TESTS" button to
    run the tests against the blank 
    pen.
  - Click the "TESTS" button to see 
    the individual test cases. 
    (should all be failing at first)
  - Start coding! As you fulfill each
    test case, you will see them go   
    from red to green.
  - As you start to build out your 
    project, when tests are failing, 
    you should get helpful errors 
    along the way!
    ************/

// PLEASE NOTE: Adding global style rules using the * selector, or by adding rules to body {..} or html {..}, or to all elements within body or html, i.e. h1 {..}, has the potential to pollute the test suite's CSS. Try adding: * { color: red }, for a quick example!

// Once you have read the above messages, you can delete all comments. 

              
            
!
999px

Console