Pen Settings



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


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


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.


                <!-- Copy pasting the script that checks the project -->
<script src=""></script>
<!-- setting up all the project prerequisites HTML first -->

<div class="wrapper">

  <div class="header">
    <h1 id="title"> Survey Form </h1>


  <div class="main">

    <form action="/random_page.js" id="survey-form">
      <p id="description">Survey for information about how much time each person spends on their computer.</p>
      <label id="name-label" for="name">*Name</label>
      <input id="name" type="text" placeholder="enter your name" required>

      <label id="email-label" for="email">*Email</label>
      <input id="email" type="email" placeholder="enter your email" required>

      <label id="number-label" for="number">*Age</label>
      <input id="number" type="number" placeholder="Age" min="1" max="120" required>

      <p> What is your current occupation? </p>

      <select id="dropdown">
   <option value disabled selected>Choose</option>
  <option value="Student">Student</option>
  <option value="Unemployed">Unemployed</option>
  <option value="Working">Working</option>

      <p> How much time do you spend on your computer? </p>

      <label for="first-choice">  About 30 mins
  <input id="first-choice" type="radio" name="time" value ="minutes" > 

      <label for="second-choice"> From 1-2 hours
  <input id="second-choice" type="radio" name="time" value="hours1"> 

      <label for="third-choice"> From 3-6 hours
  <input id="third-choice" type="radio" name="time" value="hours2"> 

      <label for="fourth-choice"> 7 hours and up
   <input id="fourth-choice" type="radio" name="time" value="hours3"> 

      <p> how do you spend that time on your computer? </p>

      <label for="videos">I Watch videos<input id="videos" type="checkbox" name="time-spent-on" value="first"> </label>

      <label for="games">I play video games<input id="games" type="checkbox" name="time-spent-on" value="second"> </label>

      <label for="study">I study<input id="study" type="checkbox" name="time-spent-on" value="third">  </label>
      <!--<label for="all-of-listed"><input id="all-of-listed" type="checkbox" name="time-spent-on" value="fourth"> All of the listed things  </label> -->
      <label id="spacing" for="additional"> Do you think you spend your time on the computer productively?</label>
      <textarea id="additional"placeholder="Enter your text"cols="60" rows="4" ></textarea>

    <button id="submit" type="submit" form="survey-form" value="Submit">Submit</button>



Inspired by W3Dschool and scrimba grid course.

body {
  background-color: #ffeead;
  margin: 10px;
  font-family: "Fira Sans", sans-serif;
  overflow-x: hidden;

.wrapper > div {
  display: block;

  align-items: center;
  font-size: 1em;

.wrapper {
  height: 100%;
  display: grid;
  grid-gap: 50px;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 40px auto 40px;
    ". h . "
    ". m . "
    ". m . ";

.header {
  grid-area: h;

#title {
  border-bottom: 3px solid black;
  padding-top: 10px;

.main {
  grid-column: m;

#number {
  display: block;
  width: 100%;
  padding: 12px 20px;
  margin: 8px 0;
  box-sizing: border-box;

input:hover {
  border: 2px solid lightblue;

#additional {
  display: block;

#spacing {
  display: block;
  padding-top: 25px;
  padding-bottom: 25px;

input[type="radio"] {
  display: inline-block;
  margin-left: 26px;
  position: relative;

#first-choice {
  margin-left: 30px;

#third-choice {
  margin-left: 25px;

label[for="fourth-choice"] {
  display: block;
  padding: 12px;

label[for="study"] {
  display: block;
  padding: 12px;

input[type="checkbox"] {
  display: inline-block;
  margin-left: 30px;

#videos {
  margin-left: 59px;

#study {
  margin-left: 115px;

#submit {
  background-color: #555555; 
  border: none;
  color: white;
  padding: 14px 40px;
  display: inline-block;
  font-size: 14px;
  width: 100%;

#submit:hover {
  background-color: #4CAF50;
  cursor: pointer;