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

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

              
                <header>
        <h1 id="title">
            FreeCodeCamp Survey Form
        </h1>
        <p id="description">
            Thank you for taking the time to help us improve the platform
        </p>
    </header>
    <main>
        <form id="survey-form" action="">
            <div class="form-group">
                <label id="name-label" for="name">Name</label>
                <input class="form-control" type="text" name="name" id="name" placeholder="Name" required>
            </div>        
            <div class="form-group">
                <label id="email-label" for="email">Email</label>
                <input class="form-control" type="email" name="email" placeholder="Email" id="email" required>   
            </div>
            
            <div class="form-group">
                <label id="number-label" for="number">Age</label>
                <input class="form-control" type="number" name="age" min="18" max="100" placeholder="18 < Age < 100" id="number" required>    
            </div>
            
            <div class="form-group">
                <label for="dropdown">Which option best describes your current role?</label>
                <select id="dropdown" name="role" required>
                    <option selected disabled>Select Current Role</option>
                    <option value="Student">Student</option>
                    <option value="Full Time Learner">Full Time Learner</option>
                    <option value="Full Time Job">Full Time Job</option>
                    <option value="Prefer Not To Say">Prefer Not To Say</option>
                    <option value="Others">Others</option>
                </select>
            </div>
            
            <div class="form-group">
                <label>Would you recommend freeCodeCamp to a friend?</label>
                <label for="option1">
                    <input class="input-radio" type="radio" id="option1" name="recommend" value="Definitely"> Definitely
                </label>
                <label for="option2">
                    <input class="input-radio" type="radio" id="option2" name="recommend" value="Maybe"> Maybe
                </label>
                <label for="option3">
                    <input class="input-radio" type="radio" id="option3" name="recommend" value="NotSure"> NotSure
                </label>
            </div>

            <div class="form-group">
                <label for="">What would you like to see improved? (Check all that apply)</label>
                <label><input  name="prefer" value="front-end-projects" type="checkbox" class="input-checkbox" /> Front-end
                    Projects</label>
                <label>
                    <input  name="prefer" value="back-end-projects" type="checkbox" class="input-checkbox" /> Back-end
                    Projects</label>
                <label><input  name="prefer" value="data-visualization" type="checkbox" class="input-checkbox" /> Data
                    Visualization</label>
                <label><input  name="prefer" value="challenges" type="checkbox" class="input-checkbox" /> Challenges</label>
                <label><input  name="prefer" value="open-source-community" type="checkbox" class="input-checkbox" /> Open
                    Source Community</label>
                <label><input  name="prefer" value="gitter-help-rooms" type="checkbox" class="input-checkbox" /> Gitter help
                    rooms</label>
                <label><input  name="prefer" value="videos" type="checkbox" class="input-checkbox" /> Videos</label>
                <label><input  name="prefer" value="city-meetups" type="checkbox" class="input-checkbox" /> City
                    Meetups</label>
                <label><input  name="prefer" value="wiki" type="checkbox" class="input-checkbox" /> Wiki</label>
                <label><input  name="prefer" value="forum" type="checkbox" class="input-checkbox" /> Forum</label>
                <label><input  name="prefer" value="additional-courses" type="checkbox" class="input-checkbox" /> Additional
                    Courses</label>
            </div>
            
            <div class="form-group">
                <p>Any comments or suggestions?</p>
            <textarea
                id="comments"
                class="input-textarea"
                name="comment"
                rows="6"
                placeholder="Enter your comment here..."
            ></textarea>
            </div>

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

CSS

              
                body{
    font-family: 'Chelsea Market', cursive;
    background-size: contain;
    background-image: linear-gradient(
      115deg,
      rgba(32, 0, 36, 0.7),
      rgba(216, 46, 3, 0.9)
    ),url('https://www.iqtconsulting.it/wp-content/uploads/2020/01/2927263-01.png');
    width: 100%;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    max-width: 0 auto; 
}


h1 {
    font-variant: small-caps;
    text-align: center;
    color:linen;
    font-size: 3rem;
    font-weight: 900;
    width: auto;
}
 p#description {
    font-style: italic;
    font-weight: 200;
    color:linen;
    font-size: 1.25rem;
    font-variant: small-caps;
    text-align: center;
  }

main {
    border: 0 solid; 
    width: 80%;
    border-radius: 35px;
    align-self: center;
    display: flex;
    justify-content: center;
    background-image: linear-gradient(
        115deg,
        rgba(144, 50, 156, 0.7),
        rgba(238, 204, 11, 0.9)
      );
}

form{
    width: 75%;
    
}

.form-group {  
    
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-content: flex-start;
    padding: 1rem;
}

.form-group p,
.form-group label {
    align-self: flex-start;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

input,
button,
select,
option,
textarea {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

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

.submit-button{
    background-color: maroon;
    border-radius: 5px;
    border:maroon 3px solid;
    min-width:100%;
    align-self: center;
    padding: .35rem;
    color: linen;
}


              
            
!

JS

              
                
              
            
!
999px

Console