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

              
                <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title>FCC Project: Survey Form</title>
    <link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
    <div id="form-container">
        <div class="img-div">
            <img src="https://preview.ibb.co/e5npVc/apress_logo.png" alt="Apress Logo" />
        </div>

        <header>
            <h1 id="title">Book Quality Rating Survey</h1>
            <p class="required-asterisk">* Required</p>
            <!-- Hidden Paragraph Only for FCC Test Suite -->
            <p hidden id="description">"Book Quality Rating Survey" is the description & title</p>

        </header>

        <form id="survey-form">
            <div class="form-div">
                <span>Book Name</span>*<br />
                (Do not edit this field)<br />
                <input type="text" class="text-short" value="Pro C# 7: With .NET and .NET Core" required>
            </div>

            <div class="form-div">
                <span>1. The content covered what I needed and helped me to achieve my goals.</span> *<br />

                <!-- Radio Group -->
                <input type="radio" name="radio1" role="radio" value="sa" required>
                <label>Strongly Agree</label><br />
                <input type="radio" name="radio1" role="radio" value="a">
                <label>Agree</label><br />
                <input type="radio" name="radio1" role="radio" value="nand">
                <label>Neither Agree Nor Disagree</label><br />
                <input type="radio" name="radio1" role="radio" value="d">
                <label>Disagree</label><br />
                <input type="radio" name="radio1" role="radio" value="sd">
                <label>Strongly Disagree</label><br />
            </div>

            <div class="form-div">
                <span>If you would like to elaborate on your answer, please leave a comment below. If you do not wish to comment, please leave the box empty.</span><br />

                <textarea class="text-long" rows="8" cols="0"></textarea>
            </div>

            <div class="form-div">
                <span>2. The organization of the content was logical and straightforward to follow.</span> *<br />

                <!-- Radio Group -->
                <input type="radio" name="radio2" role="radio" value="sa" required>
                <label>Strongly Agree</label><br />
                <input type="radio" name="radio2" role="radio" value="a">
                <label>Agree</label><br />
                <input type="radio" name="radio2" role="radio" value="nand">
                <label>Neither Agree Nor Disagree</label><br />
                <input type="radio" name="radio2" role="radio" value="d">
                <label>Disagree</label><br />
                <input type="radio" name="radio2" role="radio" value="sd">
                <label>Strongly Disagree</label><br />
            </div>

            <div class="form-div">
                <span>3. The book was well written.</span> *<br />

                <!-- Radio Group -->
                <input type="radio" name="radio3" role="radio" value="sa" required>
                <label>Strongly Agree</label><br />
                <input type="radio" name="radio3" role="radio" value="a">
                <label>Agree</label><br />
                <input type="radio" name="radio3" role="radio" value="nand">
                <label>Neither Agree Nor Disagree</label><br />
                <input type="radio" name="radio3" role="radio" value="d">
                <label>Disagree</label><br />
                <input type="radio" name="radio3" role="radio" value="sd">
                <label>Strongly Disagree</label><br />
            </div>

            <div class="form-div">
                <span>4. The code examples were accurate.</span> *<br />

                <!-- Radio Group -->
                <input type="radio" name="radio4" role="radio" value="sa" required>
                <label>Strongly Agree</label><br />
                <input type="radio" name="radio4" role="radio" value="a">
                <label>Agree</label><br />
                <input type="radio" name="radio4" role="radio" value="nand">
                <label>Neither Agree Nor Disagree</label><br />
                <input type="radio" name="radio4" role="radio" value="d">
                <label>Disagree</label><br />
                <input type="radio" name="radio4" role="radio" value="sd">
                <label>Strongly Disagree</label><br />
            </div>

            <div class="form-div">
                <span>5. Would you like to tell us what you liked about the book?</span> *<br />

                <textarea class="text-long" rows="8" cols="0" required></textarea>
            </div>

            <div class="form-div">
                <span>6. Would you like to tell us what you disliked about the book?</span> *<br />

                <textarea class="text-long" rows="8" cols="0" required></textarea>
            </div>

            <div class="form-div">
                <span>7. Would you recommend this book to others?</span> *<br />

                <!-- Radio Group -->
                <input type="radio" name="radio5" role="radio" value="yes" required>
                <label>Yes</label><br />
                <input type="radio" name="radio5" role="radio" value="no">
                <label>No</label><br />
            </div>

            <div class="form-div">
                <span>8. Please enter your e-mail address so we can send a discount code to you.</span> *<br />

                <input type="email" id="email"
                       name="contact" placeholder="Email" required>
                <label hidden for="email" id="email-label">Email</label>
            </div>

            <!-- Set to Hidden - Required to pass FCC Test -->
            <div class="form-div" hidden>
                <span>9. Please enter your name.</span> *<br />

                <input type="text" id="name"
                       name="contact" placeholder="Name" required>
                <label for="name" id="name-label">Name</label>
            </div>

            <!-- Set to Hidden - Required to pass FCC Test -->
            <div class="form-div" hidden>
                <label id="number-label" for="number">Age:</label><input id="number" type="number" min="1" max="140" placeholder="18">
            </div>

            <!-- Set to Hidden - Required to pass FCC Test -->
            <div class="form-div" hidden>
                <select name="books" id="dropdown">
                    <option value="7">Pro C# 7</option>
                    <option value="6">Pro C# 6</option>
                </select>
            </div>

            <!-- Set to Hidden - Required to pass FCC Test -->
            <div class="form-div" hidden>
                <input type="checkbox" name="language" value="csharp">C#<br>
                <input type="checkbox" name="language" value="js" checked="checked">JavaScript<br>
            </div>

            <div class="form-div">
                <input id="submit" type="submit" value="Submit">
            </div>
        </form>
    </div>
</body>
</html>
              
            
!

CSS

              
                
/* Global Styles */

html {
	background: url(https://lh6.googleusercontent.com/4GJfgYb9omeGKHmQ7FBPVPvBXP2R6BtbyfeaJC0kQnjzfcW7BjNlLNpoXNbIPCr1QDwIxoiPkA=w2391) no-repeat center center fixed;
	-webkit-background-size: cover;
	-moz-background-size: cover;
	-o-background-size: cover;
	background-size: cover;
}

body {
	font-family: "Arvo";
	font-weight: 400;
	font-size: 16px;
	font-style: normal;
}

span {
	font-size: 18px;
	color: #ffcc00;
	font-weight: bold;
}

.text-short, .text-long, #email {
	padding: 5px 8px;
	margin: 3px 0px 0px 0px;
}

/* Header */

header {
	width: 90%;
	margin: 0px auto 25px auto;
}

header h1 {
	margin: 0px;
}

header p {
	margin: 0px !important;
	text-align: left;
}

/* Form Section */

#form-container {
	border: 4px solid #ffcc00; 
	border-radius: 2px;
	box-shadow: 0 5px 10px rgba(0,0,0,0.2);
	box-sizing: border-box;
	margin: 0.75rem auto;
	padding: 0;
	max-width: 700px;
	min-width: 280px;
	width: 100%;
	background-color: white;
}

.form-div {
	width: 90%;
	margin: 0px auto 25px auto;
}

img {
	width: 100%;
	border-bottom: 4px solid #ffcc00;
}

.img-div {
	margin: 0px 0px 25px 0px;
}

header {
	text-align: center;
	color: black;
}

textarea {
	width: 70%;
}
              
            
!

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