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

              
                <header>
	<h1 id="title"> Survey Form </h1>
</header>

<div class="container">

	<p id="description">How would you rate my survey form? <br />Please fill in your review below.</p>

	<form id="survey-form" action="">

		<p><label id="name-label" for id="name">Name: <br />
		<input class="input-field" id="name" type="text" required placeholder="Enter your name"> *</label></p>

		<p><label id="email-label" for id="email">Email address:<br /> 
		<input class="input-field" id="email" type="email" required placeholder="Enter your e-mail"> *</label></p>

		<p class="p-break"><label id="number-label" for id="number">Your rating (on a scale of 1-10): <p class="p-break"><input class="input-field" id="number" type="number" min="1" max="10" placeholder="10"></label></p>
		</p>

		<p><label id="dropdown-label" for id="dropdown">How do you find the overall design of this form?<br /> <select class="input-field" id="dropdown">
    
    <option value="Well designed">Well designed</option>
    
    <option value="Could be improved"> Could be improved</option>
    
    <option value="Not at all well designed">Not at all well designed</option>
    
 </label></select>
		</p>

		<p>Preferred areas of the form:</p>
		<p class="checkboxes">
			<p class="p-break"><label for="wording">
  <input id="wording" value="wording" type="checkbox" name="preferences"> Wording</label></input>
			</p>

			<label for="styling">
    <p class="p-break"><input id="styling" type="checkbox" value="styling" name="preferences"> Styling</label></input>
		</p>

		<label for="inputs">
    <p class="p-break"><input id="inputs" type="checkbox" value="inputs" name="preferences"> Range of inputs</label></input>
		</p>

		<label for="presumptuous">
    <p class="p-break"><input id="presumptuous" type="checkbox" checked value="presumptuous" name="preferences"> How presumptuous it is</label></input>
		</p>
		</p>
		<p>Based on this form, would you take one of my surveys again?</p>

		<div class="radio-yes">
			<label for="yes" class="radio-yes">
    <input id="yes" type="radio" checked value="yes" name="survey-again"> Yes</label></input>
		</div>

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

		<p><label for="comments">Please add any further comments you may have:</label><textarea class="input-field" id="comments" placeholder="Write your comments here" rows="2" cols="20"></textarea></p>

		<p><button id="submit" type="submit">SUBMIT</button></p>

	</form>
</div>
              
            
!

CSS

              
                body {
	background: radial-gradient(
		circle,
		rgba(248, 221, 235, 1) 69%,
		rgba(246, 254, 255, 1) 100%
	);
	font-family: "Roboto", sans-serif;
	line-height: 1.2em;
}

.container {
	margin-left: 20%;
	margin-right: 20%;
	padding: 5px 10px 10px 15px;
	border-radius: 5px;
	background-color: #fff;
	border: 6px solid #f4cae0;
	box-shadow: 5px 5px 6px #bdbdbd;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
}

#description {
	text-align: center;
	font-size: 1.3em;
	line-height: 1.5em;
}

h1 {
	margin-top: 100px;
	text-align: center;
	font-family: "Lora", serif;
	color: #7c7c7c;
	font-size: 3.5em;
	line-height: 0.3em;
}

input {
	margin-left: 5px;
	margin-top: 5px;
}

button {
	display: flex;
	margin: 0 auto;
	background-color: #e2e2e2;
	border-radius: 5px;
	font-size: 1em;
	line-height: 1em;
	height: 30px;
	width: auto;
	padding: 0% 6%;
	cursor: pointer;
}

.input-field {
	padding: 5px;
	margin-top: 6px;
}

.radio-yes {
	padding-bottom: 3px;
}

.radio-no {
	padding-bottom: 8px;
}

.checkboxes {
	line-height: 1.2em;
}

input,
.input-field {
	cursor: pointer;
}

p,
label {
	text-align: center;
}

.p-break {
	margin-top: 2px;
	margin-bottom: 3px;
}

#comments {
	margin-top: 10px;
	width: 75%;
	height: 40px;
}

@media only screen and (max-width: 768px) {
	/* For mobile phones: */
	.container {
		margin: 7.5%;
	}

	h1 {
		line-height: 1em;
	}
}

              
            
!

JS

              
                const projectName = 'survey-form';
localStorage.setItem('example_project', 'Survey Form');
              
            
!
999px

Console