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

              
                
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Card Game Store Survey Form</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
  <div class="container">
   <header>
    <h1 id="title" class="centertext">Card Game Shop Survey</h1>
    <p id="description" class="centertext">Thank you for helping us improve our service at the store</p>
   </header>

    <form id="survey-form">   
        <div class="formbox"> 
            <label id="name-label" for="name" class="namelabel">Name</label>
            <input id="name" type="text" 
            class="input-answer" placeholder="Enter your name here" required>
        </div>

        <div class="formbox">
            <label id="email-label" for="email" class="emaillabel">Email</label>
            <input id="email" type="email" class="input-answer" placeholder="Enter your email here" required>
        </div>

        <div class="formbox">
            <label id="number-label" for="number" class="agelabel">Age (optional)</label>
            <input id="number" type="number" min="8" max="99" class="input-answer" placeholder="Age">
        </div>

        <div class="formbox">
            <p class="questionlabel">Which game do you play the most at our store?</p>
            <select name="game" id="dropdown" class="select">
                <option value="magic">Magic: The Gathering</option>
                <option value="yugi">Yu-Gi-Oh</option>
                <option value="pokemon">Pokémon TCG</option>
                <option value="fab">Flesh and Blood</option>
            </select>
        </div>

        <div class="formbox">
            <p class="questionlabel">Would you recommend our store to a friend?</p>
            <label for="yes" class="label">
            <input type="radio" id="yes" name="recommend" value="Yes" checked class="input-radio">Yes</label><br>

            <label for="maybe" class="label">
            <input type="radio" id="maybe" name="recommend" value="Maybe" class="input-radio">Maybe</label><br>

            <label for="no" class="label">
            <input type="radio" id="no" name="recommend" value="No" class="input-radio">No</label><br>
        </div>

        <div class="formbox">
            <p>How would you describe yourself as a player?</p>
            <select name="player" id="describe-player" class="select" required>
                <option disabled selected value>Please select an option</option>
                <option value="casual">Casual</option>
                <option value="competitive">Competitive</option>
                <option value="pro">Pro</option>
            </select>
        </div>

        <div class="formbox">
            <p>Which kind of product you purchase at our store? (Check all that apply)</p>

           <label>
           <input type="checkbox" name="booster" id="booster" value="Boosters" class="checkboxes">Boosters</label><br>  
                     
           <label>
           <input type="checkbox" name="boosterbox" id="boosterbox" value="Booster-box" class="checkboxes">Booster Boxes</label><br>
                
           <label>
           <input type="checkbox" name="single" id="single" value="Singles" class="checkboxes">Singles</label><br>
                    
           <label>
           <input type="checkbox" name="bundle" id="bundle" value="Bundles" class="checkboxes">Bundles</label><br>
                    
           <label>
           <input type="checkbox" name="precon" id="precon" value="Precon-decks" class="checkboxes">Preconstructed Decks</label>
      
        </div>

        <div class="formbox">
            <p>Any comments or suggestions?</p>
            <textarea name="comment" id="comments" class="input-textarea" placeholder="Please enter your comment here..."></textarea>
        </div>

        <div class="formbox">         
            <button type="submit" id="submit" class="submit-button">SUBMIT</button>
        </div>
    </form>
    </div>
    
</body>
</html>
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
              
            
!

CSS

              
                @charset "UTF-8";

@import url('https://fonts.googleapis.com/css2?family=Cuprum:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap');

:root {
   --color-white: rgb(255, 255, 255);   
   --color-mainblue: #0244b8;
   --color-mainbluealpha: rgba(2, 69, 184, 0.418);
   --color-buttonblue: #0ad4eb;
   --color-effectblue: #0885cf;
}

*,
*::before {
   box-sizing: border-box;
}


body {
   font-family: 'Cuprum', sans-serif;
   font-weight: 300;
   font-size: 1.4rem;
   color: white;
   font-weight: 350;
   line-height: 1.5;   
   margin: 0;  
   
  
}

body::before {
   content: '';
   position: fixed;
   height: 100%;
   width: 100%;
   top: 0;
   z-index: -1;
   background-image: linear-gradient(to bottom, rgba(15, 15, 15, 0.98), rgba(51, 51, 51, 0.514)), url(https://images.unsplash.com/photo-1513002433973-e0a181372d60?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=870&q=80);  
   background-position: center;
   background-repeat: no-repeat;
   background-size: cover;

}

.container {
   margin: 0 auto 0 auto;
   width: 100%;
}

@media (min-width: 600px) {
   .container { max-width: 580px;

   }
}

@media (min-width: 768px) {
   .container {
      max-width: 720px;
   }
}

.centertext {
     text-align: center;
}


form {
     background-color: var(--color-mainbluealpha);
     margin: 1rem 2rem 1rem 2rem; 
     border-radius: 10px;
     padding: 1.4rem 1.4rem 1.4rem 1.4rem;    
     
}

h1 {
   font-weight: 800;
   font-size: 2.5rem;
   color: var(--color-buttonblue);
}

p {
   font-weight: 400;
   font-size: 1.6rem;
   color: var(--color-white);
}

h1,
p {
    margin-bottom: 0.5rem;   
}


#description {
   font-weight: 500;
   font-size: 1.2rem;
   margin-bottom: 2rem;
   margin-top: -0.2rem;   
}


.namelabel,
.emaillabel,
.agelabel,
.questionlabel {
    font-weight: 600;
    font-size: 1.6rem;
    color: var(--color-white);
}

.label {
  text-align: left;
}

.formbox {
   padding: 12px 20px;
   margin: auto;    
}

::placeholder {
  color: #0244b8;
}

.select {
   width: 100%;
   outline: none;
   padding: 12px 16px;
   border: none;
   border-radius: 4px;
   font-family: 'Cuprum';
   font-size: 1rem;
   color: var(--color-mainblue);
}

.select:focus {
   box-shadow: 0 0 0 0.16rem var(--color-buttonblue);
}

.select option:disabled {
  color: var(--color-buttonblue);
  background: var(--color-mainblue);
}

.input-answer {
   width: 100%;
   outline: none;
   padding: 12px 16px;
   border: none;
   border-radius: 4px;
   font-family: 'Cuprum';
   font-size: 1rem;
   color: var(--color-mainblue);

}

.input-answer:focus {
   border-color: var(--color-buttonblue);
   outline: 0;
   box-shadow: 0 0 0 0.18rem var(--color-buttonblue);
}

.input-radio,
.checkboxes {
   text-align: left;
   margin-right: 1rem;
   min-height: 1.3rem;
   min-width: 1.3rem;
   cursor: pointer;  
}

.checkboxes:focus {
     border-color: var(--color-buttonblue);
     outline: 0;
     box-shadow: 0 0 0 0.16rem var(--color-buttonblue);
}

.input-textarea {
   width: 100%;
   min-height: 140px;
   padding: 0.8rem;
   border: 1px solid var(--color-effectblue);
   border-radius: 4px;
   background-color: white;    
   resize: none;
   font-family: 'Cuprum';
   font-size: 1rem;
   transition: border-color 0.3 ease-in-out, box-shadow 0.3 ease-in-out;
   
}

.input-textarea:focus {
   border-color: var(--color-buttonblue);
   outline: 0;
   box-shadow: 0 0 0 0.16rem var(--color-buttonblue);
}   


.submit-button {
   background-color: var(--color-buttonblue);
   border: none;
   border-radius: 4px;
   padding: 0.8em;
   margin: auto;
   width: 50%;
   color: var(--color-white);
   text-align: center;
   display: block;
   font-size: 1rem;
   font-family: 'Cuprum', 'sans-serif';
   font-weight: 500;
   cursor: pointer;
}

.submit-button:hover {
   box-shadow: 0px 6px 8px #0885cf;
}



              
            
!

JS

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

Console