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

              
                <h1>Completely Native Form Inputs</h1>
<p>This form contains most native HTML input element types. Excluded are checkbox, radiobutton, image, button and submit. This is a good way to check out some native form input types that you might not have known about- or forgotten existed... If you are a mouse user, be sure to hover over the various input types to see what might appear!</p>

<p>For a bonus round, navigate through these with your keyboard (try <kbd>TAB</kbd>, <kbd>ARROW</kbd>, <kbd>SPACE</kbd>, and <kbd>ENTER</kbd>- you might be surprised what functionality already natively exists in your browser!</p>

<form>
	<div class="form-group">
		<label for="berry">Would you prefer a raspberry or a blueberry?</label>
		<input type="text" id="berry" pattern="raspberry|blueberry" />
	</div>
	<div class="form-group">
		<label for="color">Pick a color</label>
		<input id="color" type="color" name="color" value="" />
	</div>
	<div class="form-group">
		<label for="date">Pick Date:</label>
		<input type="date" id="date">
	</div>
	<div class="form-group">
		<label for="datetime-local">Date/Time (local):</label>
		<input type="datetime-local" name="datetimeLocal">
		
	</div>
	<div class="form-group">
		<label for="email">Email:</label>
		<input type="email" name="email" id="email">
	</div>
	<div class="form-group">
		<label for="file">File:</label>
		<input type="file" name="file" id="file" accept=".css">
	</div>
	<div class="form-group">
		<label for="hidden">Hidden</label>
		<input type="hidden" name="hidden" id="hidden" value="I'm hidden!">		
	</div>	
		<div class="form-group">
		<label for="month">Month</label>
		<input type="month" name="month" id="month">
	</div>
		<div class="form-group">
		<label for="number">Number</label>
		<input type="number" name="number" id="number" step="10" min="0" max="1000">
	</div>
		<div class="form-group">
		<label for="password">Password</label>
		<input type="password" name="password" id="password">
	</div>
		<div class="form-group">
		<label for="range">Range (0-10)</label>
		<input type="range" name="range" id="range" min="0" max="10">
	</div>
		<div class="form-group">
		<label for="search">Search</label>
		<input type="search" name="search" id="search">
	</div>
		<div class="form-group">
		<label for="tel">Tel</label>
		<input type="tel" name="tel" id="tel">
	</div>
		<div class="form-group">
		<label for="time">Time</label>
		<input type="time" name="time" id="time">
	</div>
		<div class="form-group">
		<label for="url">URL</label>
		<input type="url" name="url" id="url">
	</div>
		<div class="form-group">
		<label for="week">Week</label>
		<input type="week" name="week" id="week">
	</div>
	  <button type="submit">Submit</button>
		<button type="reset">Clear</button>
</form>
 
              
            
!

CSS

              
                *, *:after {
	box-sizing: border-box;
}
body {
	font-family: 'Livvic', 'Roboto', sans-serif;
	font-size: 18px;
	line-height: 1.5;
	padding: 0 0.5em;
}
h1 {
	line-height: 1;
}
button {
	font-family: 'Livvic', 'Roboto', sans-serif;
	border-radius: 4px;
	padding: 0.5em 1em;
	&[type="submit"] {
		background-color: green;
		border-color: green;
		color: white;
	}
	&[type="reset"] {
	}
	&:first-of-type {
		margin-right: 0.5em;
	}
}
form {
	border: 3px solid black;
	margin: 0 auto;
	max-width: 100%;
	padding: 1em;
	width: 600px;
	
}
input {
	padding: 0.5em;
	border-radius: 4px;
	width: 100%;
}
input[type="image"] {
	width: auto;
}
input:invalid {
  border: 2px dashed red;
}

input:valid {
  border: 2px solid black;
}
.form-group {
	display: block;
	clear: both;
	margin-top: 0.5em;
	margin-bottom: 1em;
	label {
		display: block;
		font-weight: bold;
		color: navy;
		&.outdated {
			color: red;
		}
	}
}
              
            
!

JS

              
                
              
            
!
999px

Console