Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

              
                <form>
	<label for="firstName">First Name</label>
	<input id="firstName" type="text">

	<label for="lastName">Last Name</label>
	<input id="lastName" type="text">

	<label for="emailAddress">Email Address</label>
	<input id="emailAddress" type="email">

	<label for="phoneNumber">Phone Number</label>
	<input id="phoneNumber" type="tel">

	<label for="mailingAddress">Mailing Address</label>
	<input id="mailingAddress" type="text">

	<label for="zip" id="zipLabel">Zip</label>
	<input id="zip" type="text">

	<label for="city" id="cityLabel">City</label>
	<input id="city" type="text">

	<label for="state" id="stateLabel">State</label>
	<select id="state">
		<option value="AL">Alabama</option>
		<option value="AK">Alaska</option>
		<option value="AZ">Arizona</option>
		<option value="AR">Arkansas</option>
		<option value="CA">California</option>
		<option value="CO">Colorado</option>
		<option value="CT">Connecticut</option>
		<option value="DE">Delaware</option>
		<option value="DC">District Of Columbia</option>
		<option value="FL">Florida</option>
		<option value="GA">Georgia</option>
		<option value="HI">Hawaii</option>
		<option value="ID">Idaho</option>
		<option value="IL">Illinois</option>
		<option value="IN">Indiana</option>
		<option value="IA">Iowa</option>
		<option value="KS">Kansas</option>
		<option value="KY">Kentucky</option>
		<option value="LA">Louisiana</option>
		<option value="ME">Maine</option>
		<option value="MD">Maryland</option>
		<option value="MA">Massachusetts</option>
		<option value="MI">Michigan</option>
		<option value="MN">Minnesota</option>
		<option value="MS">Mississippi</option>
		<option value="MO">Missouri</option>
		<option value="MT">Montana</option>
		<option value="NE">Nebraska</option>
		<option value="NV">Nevada</option>
		<option value="NH">New Hampshire</option>
		<option value="NJ">New Jersey</option>
		<option value="NM">New Mexico</option>
		<option value="NY">New York</option>
		<option value="NC">North Carolina</option>
		<option value="ND">North Dakota</option>
		<option value="OH">Ohio</option>
		<option value="OK">Oklahoma</option>
		<option value="OR">Oregon</option>
		<option value="PA">Pennsylvania</option>
		<option value="RI">Rhode Island</option>
		<option value="SC">South Carolina</option>
		<option value="SD">South Dakota</option>
		<option value="TN">Tennessee</option>
		<option value="TX">Texas</option>
		<option value="UT">Utah</option>
		<option value="VT">Vermont</option>
		<option value="VA">Virginia</option>
		<option value="WA">Washington</option>
		<option value="WV">West Virginia</option>
		<option value="WI">Wisconsin</option>
		<option value="WY">Wyoming</option>
	</select>

	<label for="code">Code</label>
	<input id="code" type="text">

	<label for="yourStory">What is your story?</label>
	<textarea id="yourStory"></textarea>
 
	<button>Sign up</button>
</form>
              
            
!

CSS

              
                form {
	/* define our grid on the parent element */
	display: grid;
	/* divide that grid using grid-template-columns */
	grid-template-columns: 200px 100px 1fr 100px 1fr 100px 1fr;
	/* add a gutter of 16px between the rows and columns */
	grid-gap: 16px;
}
 
label {
	/* Put labels in column 1 */
	grid-column: 1 / 2;
}
 
input, button, textarea, select {
	/* Put the inputs, button, and textarea in columns 2 through 7 (spanning across them) */
	grid-column: 2 / 8;
}

#zipLabel {
	/* Put the label in column 2 */
	grid-column: 2 / 3;
}

#zip {
	/* Put the input in column 3 */
	grid-column: 3 / 4;
}

#cityLabel {
	/* Put the label in column 4 */
	grid-column: 4 / 5;
}

#city {
	/* Put the input in column 5 */
	grid-column: 5 / 6;
	
}

#stateLabel {
	/* Put the label in column 6 */
	grid-column: 6 / 7;
}

#state {
	/* Put the input in column 7 */
	grid-column: 7 / 8;
}
              
            
!

JS

              
                
              
            
!
999px

Console