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 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

              
                <!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=">
  <title>Responsive Web Design Projects - Build a Survey Form</title>
</head>

<body id="main">
  <header>
    <h1 id="title">What is your favorite <span class="js-font">js</span> framework or library?</h1>
  </header>
  <p id="description">Tell us what you like most about it!</p>

  <form action="" id="survey-form">

    <div class="info">
      <div class="name">
        <label for="name" id="name-label">Your name</label>
        <input type="text" name="name" id="name" placeholder="Enter your name here." required>
      </div>

      <div class="email" v>
        <label for="email" id="email-label">Your e-mail address</label>
        <input type="email" name="email" id="email" placeholder="Enter your e-mail address here." required>
      </div>

      <div class="number">
        <label for="number" id="number-label">Your phone number</label>
        <input type="number" name="number" id="number" placeholder="Enter your phone number here." min="0100000000" max="0799999999" required>
      </div>
    </div>

    <label id="library-framework-label" for="dropdown">Pick your favorite</label>
    <select name="dropdown" id="dropdown">
      <option value="React">React</option>
      <option value="AngularJS">AngularJS</option>
      <option value="Vue.Js">Vue.Js</option>
    </select>

    <fieldset>
      <legend>How would you rate its difficulty?</legend>

      <input type="radio" name="difficulty" value="easy" id="easy">
      <label for="easy">Easy</label>

      <input type="radio" name="difficulty" value="medium" id="medium">
      <label for="easy">Medium</label>

      <input type="radio" name="difficulty" value="difficult" id="difficult">
      <label for="easy">Difficult</label>

    </fieldset>

    <fieldset>
      <legend>What is its advantages (select all that apply)</legend>
      <input type="checkbox" name="advantages" id="support" value="big-community">
      <label for="">Big community</label>

      <input type="checkbox" name="advantages" id="support" value="free">
      <label for="">Free</label>

      <input type="checkbox" name="advantages" id="support" value="in-demand">
      <label for="">In demand</label>

      <input type="checkbox" name="advantages" id="support" value="active">
      <label for="">Active</label>

      <input type="checkbox" name="advantages" id="support" value="fast">
      <label for="">Fast</label>

      <input type="checkbox" name="advantages" id="support" value="open-source">
      <label for="">Open source</label>

      <input type="checkbox" name="advantages" id="support" value="lightweight">
      <label for="">Lightweight</label>

    </fieldset>

    <textarea name="additional-comments" id="additional-comments" cols="" rows="" placeholder="Place any additional comments here!"></textarea>

    <button id="submit">Send </button>
  </form>

  <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
</body>

</html>
              
            
!

CSS

              
                :root {
  --yellow: #f4e04f;
}
html {
  font-family: monospace;
  font-size: 11px;
  box-sizing: border-box;
}
.js-font {
  background-color: var(--yellow);
  padding: 0.4em 0.1em 0.05em 0.4em;
  text-transform: capitalize;
  font-family: sans-serif;
  display: inline-block;
}
p {
  text-align: center;
  background-color: #f4e04f;
}
p#description {
  text-transform: uppercase;
  font-weight: bold;
}
form {
  flex-direction: column;
  padding: 2em;
}
input,
select,
fieldset,
textarea {
  margin-bottom: 1em;
}
fieldset {
  background-color: var(--yellow);
}
#library-framework-label {
  width: 60%;
}
#dropdown {
  width: 100%;
}
.name,
.email,
.number {
  display: flex;
  align-items: end;
}
div.info > div {
  padding: 1em;
  margin-bottom: 1em;
}
div.info > div > input {
  padding: 1em;
  background-color: var(--yellow);
  border: none;
  border-bottom: 3px solid black;
  min-width: 50%;
  margin: 0;
  font-size: 1.1em;
  color: black;
  font-family: monospace;
}
div.info label,
legend {
  background-color: black;
  color: yellow;
  padding: 1em;
}
label[for="dropdown"],
label[for="dropdown"] + select {
  background-color: var(--yellow);
  color: black;
  padding: 1em;
  font-size: 1.5em;
  font-family: monospace;
  font-weight: bold;
  width: 20%;
  display: inline-block;
  margin: 2em auto;
}
textarea {
  font-family: inherit;
  font-size: inherit;
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 3px solid black;
  padding: 1em;
}
button {
  display: block;
  width: 100%;
  background-color: black;
  color: yellow;
  border: none;
  padding: 1em;
  text-transform: uppercase;
  font-size: 2em;
  font-family: monospace;
}

@media screen and (min-width: 600px) {
  body {
    padding: 1em 6em;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console