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

              
                <!-- 

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 

-->
<html>

<head>
  <title>A feedback form</title>
  <link href="https://fonts.googleapis.com/css?family=Lato|Supermercado+One" rel="stylesheet">

</head>
<main>
  <div id=main>

    <body>
      <h1 id="title" style="text-align:center;">Feedback Form</h1>
      <form id="survey-form">
        <p id="description">
          Let us know how we can improve freeCodeCamp
        </p>
        <label id="name-label" for="name">*Name:</label><input id="name" type="field" required placeholder="John Doe"><br>
        <label id="email-label" for="email">*Email:</label><input id="email" type="email" required placeholder="abc@example.com"><br>
        <label id="number-label" for="number">Age:</label><input id="number" type="number" min="1" max="100" placeholder="18"><br>
        <label for="roles">Which option best describes your current role?</label>
        <select name="roles" id="dropdown">
  <option value="student">Student</option>
  <option value="full-time job">Full time job</option>
  <option value="full time learner">Full time learner</option>
  <option value="other">other</option>
        </select><br>
        <label for="radio">* How likely is that you would recommend freeCodeCamp to a friend?</label>
        <input type="radio" name="radio" value="definately">Definately<br>
        <input type="radio" name="radio" value="maybe">Maybe<br>
        <label for="checkbox">Things that should be improved in the future
        (Check all that apply):</label>
        <input type="checkbox" name="checkbox" value="front-end-projects">Front-end Projects<input type="checkbox" name="checkbox" value="back-end-projects">Back-end Projects<br><label for="textarea"></label>
        <label for="text-area">comments</label>
        <textarea id="text-area"></textarea>
        <input id="submit"
type="submit">      </form>
    </body>
  </div>
</main>

</html>
              
            
!

CSS

              
                h1{
 
    font-family: 'Supermercado One',cursive;
}
body{
  font-family: 'Lato', sans-serif;
}
form{
  background-color:MediumAquamarine;
  margin: 0 auto;
  width: 400px;
  /* To see the outline of the form */
  padding: 4em;
  border: 1px solid #CCC;
  border-radius: 1em;
  
}
form div + div {
  margin-top: 1em;
}
label {
  /* To make sure that all labels have the same size and are properly aligned */
  display: inline-block;
  width:90px;
  text-align: right;
}
input, textarea {
  /* To make sure that all text fields have the same font settings
     By default, textareas have a monospace font */
  font: 1em sans-serif;

  /* To give the same size to all text fields */
  width: 300px;
  box-sizing: border-box;

  /* To harmonize the look & feel of text field border */
  border: 1px solid #999;
}
input:focus, textarea:focus {
  /* To give a little highlight on active elements */
  border-color: #000;
}
textarea {
  /* To properly align multiline text fields with their labels */
  vertical-align: top;

  /* To give enough room to type some text */
  height: 5em;
}

.button {
  /* To position the buttons to the same position of the text fields */
  padding-left: 90px; /* same size as the label elements */
}

button {
  /* This extra margin represent roughly the same space as the space
     between the labels and their text fields */
  margin-left: .5em;
}
              
            
!

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