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

              
                   <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Simonetta&display=swap">

<header>
      <h1 id="title">Crafting Survey Form</h1>
      <p id="description">Which is your craft of choice?</p>
    </header>
       
    <div class="container">   
      <form action="process.php" id="survey-form" method="post">
        <label id="name-label">Name</label>
          <input class="placeholder" type= "text" id="name" name="name"  placeholder="Enter Your Name" required>
        <label id="email-label" >Email</label>
          <input class="placeholder" type="email" id="email" name="email" placeholder="Enter Your Email"  required >
        <label id="number-label">Age</label>
          <input class="placeholder" type="number" id="number" name="age"  min="0" max="120" required placeholder="Select Your Age">

        <p class="question">How often do you craft?</p>

        <div class="grid-container">
          <div>
            <label>
              <input class="radio-input" type="radio" name="time" value="everyday">Everyday
            </label>
            <label>
              <input class="radio-input" type="radio" name="time" value="once a week">Once a week
            </label>
          </div>
          <div>
            <label>
              <input class="radio-input" type="radio" name="time" value="twice a week">Twice a week
            </label>
            <label>
              <input class="radio-input" type="radio" name="time" value="once a month">Once a month
            </label>
          </div>
        </div>
         
        <p class="question">What is the main reason you craft?</p>
       
        <select class="placeholder" id="dropdown" name="reason">
          <option  value="choose">Choose one...</option>
          <option class="choice" value="Relaxation">Relaxation</option>
          <option value="To earn income">It makes me money</option>
          <option  value="uses my creative imagination">Uses my creative imagination</option>
        </select>
             
        <p class="question">What types of crafting do you enjoy?</p>
              
        <div class="grid-container">
          <div>
            <label>
              <input class="checkbox-margin" type="checkbox" name="types" value="Card-Making">Card-Making
            </label>
            <label>
              <input class="checkbox-margin" type="checkbox" name="types" value="Mixed Media">Mixed Media
            </label>
            <label>
              <input class="checkbox-margin" type="checkbox" name="types" value="Quilting">Quilting
             </label>
            
          </div>
          <div>
            <label>
              <input class="checkbox-margin" type="checkbox" name="types" value="Woodwork">Woodwork
            </label>
            <label>
              <input class="checkbox-margin" type="checkbox" name="types" value="Home Crafts">Home Crafts
            </label>
            <label>
              <input class="checkbox-margin" type="checkbox" name="types" value="Digital Design">Digital Design
            </label>
          </div>
          <div>
            <label>
            <input class="checkbox-margin" type="checkbox" name="types" value="Other">Other..please enter below
            </label>
          </div>
         </div>
            
      
    <textarea class="placeholder" cols="20" rows="15" id="other-crafts" name="other" placeholder="Enter other crafts here..."></textarea>
        

        <div class="btn">
          <input type="submit" id="submit" name="submit" value="Submit">
        </div>
      </form>
    </div>

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

CSS

              
                *   {
  box-sizing: border-box;
  margin:0;
  padding:0;
}
body{
  background: url('https://images.unsplash.com/photo-1522167428-d603a1d62f26?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=60') no-repeat center center/cover;
  font-family:'Simonetta', sans-serif;
  font-size: 2rem;
  line-height: 1;
}

h1  {
  font-size: 50px;
}

#title, #description {
  
  color: #001933;
  font-weight: bold;
  margin: 2rem;
  text-align: center;
  text-shadow: 2px 2px 2px #fff2e6;
  text-transform: uppercase;
}

#survey-form {
  
  background-color: rgb(0, 25, 51, 0.9);
  border-radius: 5px;
  box-shadow: 2px 2px 7px #333;
  color: #fff2e6;
  margin: 30px auto;
  max-width: 700px;
  padding: 2vh;
  width: 90%;
}
    
#survey-form label{
    
  display: block; 
  font-size: 1.2rem;
  padding: 3vh;
}

.placeholder:hover {
  background-color: rgba(155, 201, 236, 0.9);
  color: #fff2e6;
}

#name, #email, #number, #dropdown{
    
  border-radius: 5px;
  width: 100%;
  height: 7vh;
}

.question {
  background-color: rgba(82, 139, 182, 0.9);
  border-radius: 5px;
  font-size: 1.3rem;
  margin: 20px 1px;
  padding: 2vh;
  text-align: center;
  text-transform: uppercase;
}

.grid-container{
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-left: 1em;
}

.radio-input, .checkbox-margin{
  margin-right: 1.5rem;
}

.placeholder {
  font-size: 1rem;
  font-family: Simonetta, sans-serif;
  padding: 1vh 1vw;
  width: 100%;

}

#other-crafts {
    border-radius: 5px;
    height: 30vh;
    max-width: 100%;
}
   
#other-crafts::placeholder {

  text-align: left;
}

#submit{
    background: #528bb6;
    border: none;
    width: 40%;
    height: 5vh;
    margin: 10px auto;
    border-radius: 5px;
    color: #fff2e6;
    font-size: 1.2rem;

}

#submit:hover{
    background: #9bc9ec;
}
.btn{
    text-align: center;
}

@media screen and (max-width:670px) {
  
  .grid-container{
  display: grid;
  grid-template-columns: 1fr;
  margin-left: 1rem;
  }
 }
              
            
!

JS

              
                
              
            
!
999px

Console