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

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

<!-- 

Hello Camper!

For now, the test suite only works in Chrome! Please read the README below in the JS Editor before beginning. Feel free to delete this message once you have read it. Good luck and Happy Coding! 

- The freeCodeCamp Team 

-->
<!DOCTYPE html>
<html lang="en-US">
<head>
	<title>Survey Form</title>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" type="text/css" href="#">
</head>
<body>

	<header>
		<h1 id="title">Survey Form</h1>
	</header>
	<div class="container">
		<p id="description">Let us know how we can improve freeCodeCamp</p>
		<form id="survey-form" name="survey" action="/action-page.php" onsubmit="#" method="POST">
			<main>
				<fieldset>	
					<legend class="sr-only">Personal Information</legend>
					<div class="section">

						<div class="labels">
							<label id="name-label" for="name">* Name:</label>
						</div>
						<div class="inputs">
							<input id="name" class="charInput" type="text" name="name" maxlength="50" placeholder="Enter Your Name" autofocus required>
						</div>
						<div class="labels">
							<label id="email-label"	for="email">* Email:</label>
						</div>
						<div class="inputs">
							<input id="email" class="charInput" type="email" name="email" maxlength="50" placeholder="Email" required>
						</div>
						<div class="labels">
							<label id="number-label" for="number">* Age:</label>
						</div>
						<div class="inputs">
							<input id="number" class="charInput" type="number" name="age" min="1" max="101" placeholder="Age" required>
						</div>
					</div>
				</fieldset>
			</main>

			<div class="section">
				<div class="labels">
					<label id="dropdown-label" for="currentPos">Which option best describes your current role?</label>
				</div>	
				<div class="inputs">
					<select id="dropdown" name="currentPos" class="dropdown">
						<option disabled selected value>Select an option</option>
						<option value="student">Student</option>
						<option value="job">Full Time Job </option>
						<option value="learner">Full Time Learner</option>
						<option value="preferNo">Prefer Not to Say</option>
						<option value="other">Other</option>
					</select>
				</div>
			</div>

			<fieldset>
				<div class="section">
					<div class="labels">
						<legend>* How likely is that you would recommend freeCodeCamp to a friend?</legend>
					</div>
					<div class="inputs">
						<input id="definitely" type="radio" name="somename" value="definitely">
						<label id="radio-option-one" for="definitely">Definitely</label><br>
						<input id="maybe" type="radio" name="somename" value="maybe">
						<label id="radio-option-two" for="maybe">Maybe</label><br>
						<input id="not-sure" type="radio" name="somename" value="not-sure">
						<label id="radio-option-three" for="not-sure">Not Sure</label><br>
					</div>
				</div>
			</fieldset>

			<div class="section">
				<div class="labels">
					<label id="preference-options" for="preference">What do you like most in FCC?</label>
				</div>
				<div class="inputs">
					<select id="preference" name="preference" class="dropdown">
						<option disabled selected value>Select an option</option>
						<option value="challenges">Challenges</option>
						<option value="projects">Projects</option>
						<option value="community">Community</option>
						<option value="openSource">Open Source</option>
					</select>
				</div>
			</div>

			<fieldset>
				<div class="section">
					<div class="labels">
						<legend>Things that should be improved in the future (Check all that apply):</legend>
					</div>
					<div class="inputs">
						<ul style="list-style: none">	
							<li class="checkbox"><label><input type="checkbox" name="front-end" value="value1">Front-end Projects</label></li>
							<li class="checkbox"><label><input type="checkbox" name="back-end" value="value2">Back-end Projects</label></li>
							<li class="checkbox"><label><input type="checkbox" name="data-visualization" value="value3">Data Visualization</label></li>
							<li class="checkbox"><label><input type="checkbox" name="challenges" value="value4">Challenges</label></li>
							<li class="checkbox"><label><input type="checkbox" name="open-source" value="value5">Open Source Community</label></li>
							<li class="checkbox"><label><input type="checkbox" name="gitter-help" value="value6">Gitter help rooms</label></li>
							<li class="checkbox"><label><input type="checkbox" name="videos" value="value7">Videos</label></li>
							<li class="checkbox"><label><input type="checkbox" name="city-meetups" value="value8">City Meetups</label></li>
							<li class="checkbox"><label><input type="checkbox" name="wiki" value="value9">Wiki</label></li>
							<li class="checkbox"><label><input type="checkbox" name="forum" value="value10">Forum</label></li>
							<li class="checkbox"><label><input type="checkbox" name="additional-courses" value="value11">Additional Courses</label></li>
						</ul>	
					</div>
				</div>
			</fieldset>

			<div class ="section">
				<div class="labels">
					<label id="leave-comments" for="comments">Any comments or suggestions?</label>
				</div>
				<div class="inputs">
					<textarea id="comments" class="textArea" name="comment" maxlength="500" placeholder="Enter your comments here..."></textarea>
				</div>
			</div>

			<div class="button">
				<button id="submit" type="submit">SUBMIT</button>
			</div>

		</form>
	</div>

	<footer><a href="#">Created by Illia Goldin</a></footer>
</body>
</html>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro');
@import url('https://fonts.googleapis.com/css?family=Fira+Sans');


html, body {
	background-color: #3b3838;
	padding: 0;
	margin: 0;
	color: white;
	font-family: 'Source Sans Pro', sans-serif;
	min-width: 20rem;
	font-size: 1.25rem;
}

h1 {
	text-align: center;
}

::selection {
	background-color: #000000; 
	color: white;
}

::-moz-selection {
	background-color: #000000;
	color: white;
}

/*Grid*/
.section {
	padding: .625rem;
	position: relative;
	display: grid;
	grid-gap: .625rem .625rem;
	grid-template-columns: 40% 40%;
	justify-content: center;
}

/*Form Container*/
.container {
	position: relative;
	background-color: #006366;
	height: auto;
	width: 100%;
	margin: auto;
	color: white;
	max-width: 62.5rem;
}

.container p {
	text-align: center;
	padding-bottom: .625rem;
	padding-top: 1.25rem; 
	margin-bottom: 0;
}

.container ul {
	padding: 0;
	margin: 0;
} 

/*Form*/
form {
	padding: 0;
	margin: 0;
}

legend {
	padding: 0;
}

fieldset {
	padding: 0;
	margin: 0;
	border: none;
}

input:focus {
	outline: none;
}

input, textarea, select {
	font-family: inherit;
	font-size: inherit;
}

input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0px 62.5rem #006366 inset;
}

input:invalid {
	border-color: red;
}

textarea {
	height: 9.375rem; 
	width: 15.625rem; 
	resize: vertical;
}

select, option {
    width: 15.625rem;
}

button {
	height: 2.5rem;
	width: 6.25rem;
	color: #fff;
	font-family: 'Fira Sans', sans-serif;
	letter-spacing: .125rem;
	font-size: 1rem;
	font-weight: bolder;
	background-color: #920AB8 /*#cd3bf5*/;
	border-style: none;
	margin-top: .625rem;
	margin-bottom: 1.25rem;

}

button:hover {
	height: 3.125rem;
	width: 6.875rem;
	margin-bottom: .625rem;
	border-style: solid;
	border-color: #fff;
	border-width: .063rem;
	cursor: pointer;
}

.labels {
	text-align: right;
}

.button {
	text-align: center;
}

.charInput {
	width: 15.625rem;
	background-color: #006366 /*#00CED1*/;
	border-right: none;
	border-left: none;
	border-top: none;
	color: white;
	text-align: center;
}

/*Footer*/
footer {
	text-align: center;
	margin-top: 1.25rem;
	padding-bottom: 1.25rem;
}

footer a {
	color: #fff;
}

footer a:hover {
	font-size: 1.125rem;
}

footer a:visited {
	color: #A9A9A9;
}

/*SR-Only*/
.sr-only {
	  position: absolute;
	  left: -10000px;
	  width: 1px;
	  height: 1px;
	  top: auto;
	  overflow: hidden;
	}

/*Media Queries*/
@media only screen and (max-width: 43.75rem) {

	/*Grid*/
	.section {
		grid-template-columns: 100%;
		justify-content: center;
		border-style: solid; 
		border-top: none;
		border-right: none;
		border-left: none;
		border-color: #3b3838;
	}
	
	/*Form*/
	.labels {
		text-align: left;
	}

	.inputs {
		text-align: left;
	}

	.charInput {
		width: 100%;
	}

	textarea {
	width: 98%;
	}	
              
            
!

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