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

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

<div class="container">
  <header>
    <h1 id="title">Movie Buff Survey Form</h1>
    <p id="description">If you are a movie buff, Please take a few moments to complete this survey</p>
  </header>
  <main>
    <form id="survey-form">
      <label for="name" id="name-label">Name:</label>
      <input type="text" id="name" class="text" placeholder="Enter your name" required>
      <label for="email" id="email-label">Email:</label>
      <input type="email" id="email" class="text" pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$"  placeholder="Enter your email" required>
      <label for="number" id="number-label">Age:</label>
      <input type="number" id="number" class="text"  min=10 max=99 placeholder="Enter your age">
      <label>Gender:</label>
      <label class="check" for="male">Male
        <input type="radio" id="male" name="gender" value="male">
        <span class="radmark"></span>
      </label>
      <label class="check" for="female">Female
         <input type="radio" id="female" name="gender" value="female">
         <span class="radmark"></span>
      </label>
      <label class="check" for="other">Other
          <input type="radio" id="other" name="gender" value="other">
          <span class="radmark" ></span>
      </label>
      <label for="dropdown" id="dropdown-label">Favourite Film industry:</label>
      <select id="dropdown" name="industry">
        <option value="Bollywood">Bollywood</option>
        <option value="Hollywood">Hollywood</option>
        <option value="Kollywood">Kollywood</option>
        <option value="Mollywood">Mollywood</option>
        <option value="Tollywood">Tollywood</option>
      </select>      
      <label >Select your favourite Movie Genres:</label>
       <label class="check" for="action"> Action
         <input type="checkbox" id="action" name="action" value="Action">
         <span class="checkmark"></span>
       </label>
      <label class="check" for="comedy"> Comedy
        <input type="checkbox" id="comedy" name="comedy" value="Comedy">
        <span class="checkmark"></span>s
      </label>
      <label class="check" for="drama"> Drama
        <input type="checkbox" id="drama" name="drama" value="Drama">
        <span class="checkmark"></span>
      </label>
      <label class="check" for="horror">Horror
        <input type="checkbox" id="horror" name="horror" value="Horror">
        <span class="checkmark"></span>
      </label>
      <label class="check" for="musicals">Musicals
         <input type="checkbox" id="musicals" name="musicals" value="Musicals">
         <span class="checkmark"></span>
      </label>
      <textarea name="comment" rows="10" cols="30">Tell us about your favorite movie.
      </textarea>
      <input type="reset" id="reset" value="Reset">
      <input type="submit" id="submit" value="Submit">      
    </form>
  </main>
</div>

              
            
!

CSS

              
                * {
  box-sizing: border-box;
}


body{
  background-image: url(https://cdn.pixabay.com/photo/2014/11/30/17/15/theater-551797_1280.jpg);
  background-size: cover;
  margin-top:2%;
}

header{
  text-align: center;
  color:floralwhite;
}
h1 {
  text-shadow: 3px 3px 5px red ;
  font-size: 2.2em;
}
p{
  text-shadow: 5px 5px 5px red;
  font-size: 1.2em;
}

#survey-form{   
  background-color: #ea1616;  
  margin-top:4%;
  margin-left:25%;
  margin-right:25%;
  margin-bottom:0;
  padding:50px;
  border: 1px solid;  
  box-shadow: 0px 0px 10px 10px black inset;
  border-radius:25px;
  
}

.text {
  border:none;
  background-color: #f5e4c3;  
  width: 100%;
  padding: 15px;
  margin-top: 5px;
  margin-bottom: 4px;
  box-sizing: border-box;
  border-radius:5px;
  box-shadow: 0px 0px 3px 3px black inset;

  
}
::placeholder{
  color:black;
}

label{
  font-weight: bold;
  font-size: 1.2em;
  margin:5px;
 
}

.check{
  display: block;
  position: relative;
  padding-left: 35px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 16px;
  
}

.check input{
  position: absolute;
  opacity: 0;
  cursor: pointer;
  
  
}
.radmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 20px;
  width: 20px;
  background-color: #f5e4c3;
  border-radius: 50%;
  box-shadow: 0px 0px 2px 2px black inset;
}
.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 20px;
  width: 20px;
  background-color: #f5e4c3;
  box-shadow: 0px 0px 2px 2px black inset;
}


.check input:checked ~ .checkmark {
  background-color: black;
}
.check input:checked ~ .radmark {
  background-color: black;
}

 .checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 7px;  
  width: 4px;
  top:2px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0; 
  transform: rotate(45deg);
}
.radmark:after {
  content: "";
  position: absolute;
  display: none;
  top: 7px;
  left: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: white;
}


.check input:checked ~ .checkmark:after {
  display: block;
}
.check input:checked ~ .radmark:after {
  display: block;
}



#dropdown{
  border:none;
  background-color: #f5e4c3;  
  width: 100%;
  padding: 15px ;
  margin: 10px 5px;
  box-sizing: border-box;
  border-radius:5px;
  box-shadow: 0px 0px 3px 3px black inset;
  
}

textarea {
  width: 100%;
  height: 150px;
  padding: 12px 20px;
  box-sizing: border-box;
  border: 1px solid black;
  border-radius: 4px;
  background-color: #f5e4c3;
  font-size: 16px;
  resize: none;
  box-shadow: 0px 0px 3px 3px black inset
}

 input[type=submit], input[type=reset] {
  background-color: orange;
  border: none;
  color: black;
  padding: 16px 32px;
  text-decoration: none;
  margin: 5% 2%;
  cursor: pointer;
  font-weight: bold;
  border-radius: 4px;
  box-shadow: 0px 0px 3px 3px black inset;  
  width:  45%;
}
input[type=submit]{
  background-color:forestgreen;
  
}
@media screen and (max-width: 500px) { 
   .container { 
            max-width: 500px; 
        }      
  #submit, 
  #reset{
    width: 100%;
  }
  #survey-form{
    margin: 0 auto;
    width: 100%;
  }
}
              
            
!

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