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

              
                <main id="body"> 
	<section id="page"> 
		<h2>Content area</h2> 
		<p>Content area text body.</p> 
	</section> 
</main> 
<div id="footer"> 
	<section id="cta"> 
		<h2>Call-to-action</h2> 
		<p>Call-to-action message body.</p> 
		<form> 
			<input type="text" placeholder="E-mail address" /> 
			<input type="submit" value="Try now" /> 
		</form> 
	</section> 
	<section id="resources"> 
		<h2>Resources</h2> 
		<div id="modules"> 
			<h2>Resources</h2> 
			<div class="module"> 
				<h3>Product</h3> 
				<ul> 
					<li><a href="">Pricing</a></li> 
					<li><a href="">Features</a></li> 
					<li><a href="">Documentation</a></li> 
					<li><a href="">Developers</a></li> 
				</ul> 
			</div> 
			<div class="module"> 
				<h3>Company</h3> 
				<ul> 
					<li><a href="">Mission</a></li> 
					<li><a href="">History</a></li> 
					<li><a href="">Staff</a></li> 
					<li><a href="">Management</a></li> 
					<li><a href="">Contact</a></li> 
				</ul> 
			</div> 
			<div class="module"> 
				<h3>Contact</h3> 
				<ul> 
					<li class="mail"><a href="">Support</a></li> 
					<li class="phone"><a href="">+0 1 234 567</a></li> 
					<li class="twitter"><a href="">@company</a></li> 
					<li class="facebook"><a href="">Company</a></li> 
				</ul> 
			</div> 
			<div class="module"> 
				<h3>Company</h3> 
				<p>Text area used for company description, address and company logo.</p> 
				<ul> 
					<li>Company street 123</li> 
					<li>123 45 City, Country</li> 
				</ul> 
			</div> 
		</div> 
	</section> 
	<div id="signature" aria-hidden="true"></div> 
	<footer id="legal"> 
		<p>&copy; 3000 by Company. All rights reserved. Please read the <a href="">Privacy Policy</a> and <a href="">Terms of Service</a>.</p> 
	</footer> 
</div> 
              
            
!

CSS

              
                /* Simple reset */ 
html, body, #body *, #footer *{ margin: 0; padding: 0; display: block; color: #3d3d3d; font-family: "Open Sans", sans-serif; font-size: inherit; font-weight: normal; text-decoration: none; line-height: 1; outline: 0; } 

/* FontAwesome */ 
	@font-face{ font-family: "FontAwesome"; src: url("https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/fonts/fontawesome-webfont.eot?v=4.7.0"); src: url("https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/fonts/fontawesome-webfont.eot?#iefix&v=4.7.0") format("embedded-opentype"), url("https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"), url("https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/fonts/fontawesome-webfont.woff?v=4.7.0") format("woff"), url("https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/fonts/fontawesome-webfont.ttf?v=4.7.0") format("truetype"), url("https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular") format("svg"); font-weight: normal; font-style: normal; } 

/* Queries */ 
	/* Min */ 
	@media (min-width: 0){ 
		html{ font-size: 50%;  } 
			body{ min-width: 200px; background: #f0f0ef; } 
				#body{  } 
					#page{ padding: 4em; background: #fff; } 
						#page > h2{ color: #444; font-size: 1.25em; font-weight: 600; text-transform: uppercase; } 
						#page > p{ margin-top: 2em; line-height: 1.25; } 
				#footer{ background: #202020; } 
					#cta{ padding: 4em; background: #350f55; } 
						#cta > h2{ color: #fff; font-size: 2em; font-weight: 600; text-transform: uppercase; text-align: center; } 
						#cta > p{ margin-top: 1em; color: #ddd; text-align: center; line-height: 1.5; } 
						#cta > form{ margin: 0 auto; margin-top: 2em; max-width: 40em; } 
							#cta > form{ position: relative; } 
								#cta > form > input[type=text]{ padding: 1em; padding-right: 7em; width: 100%; height: 4em; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } 
								#cta > form > input[type=submit]{ position: absolute; top: 0; right: 0; bottom: 0; padding: 1em; height: 4em; color: #fff; font-weight: 600; background: #fe9909; border: 0; cursor: pointer; } 
								#cta > form > input[type=submit]:hover{ background: #fdca40; } 
					#resources{  } 
						#resources > h2{ display: none; }
						#modules{ padding: 4em; margin-bottom: -2em; } 
							#modules > h2{ display: none; } 
							#modules > .module{  } 
								#modules > .module > h3{ margin-bottom: 2em; color: #f2f0ed; font-size: 1.25em; font-weight: 600; text-transform: uppercase; text-align: center; } 
								#modules > .module > p{ margin-bottom: 2em; color: #f2f0ed; line-height: 1.25; } 
								#modules > .module > ul{ margin-bottom: 2em; } 
									#modules > .module > ul > li{ color: #f2f0ed; line-height: 1.25; } 
										#modules > .module > ul > li > a{ color: #fe9909; line-height: 1.25; } 
										#modules > .module > ul > li.mail > a:before{ content: "\f003"; margin: 0 0.5em 0 0; display: inline-block; color: #f9f8f7; font-family: "FontAwesome"; text-align: center; } 
										#modules > .module > ul > li.phone > a:before{ content: "\f095"; margin: 0 0.5em 0 0; display: inline-block; color: #f9f8f7; font-family: "FontAwesome"; text-align: center; } 
										#modules > .module > ul > li.facebook > a:before{ content: "\f09a"; margin: 0 0.5em 0 0; display: inline-block; color: #f9f8f7; font-family: "FontAwesome"; text-align: center; } 
										#modules > .module > ul > li.twitter > a:before{ content: "\f099"; margin: 0 0.5em 0 0; display: inline-block; color: #f9f8f7; font-family: "FontAwesome"; text-align: center; } 
										#modules > .module > ul > li > a:hover{ color: #fdca40; } 
					#signature{  } 
					#legal{ padding: 2em 4em; background: #f9f8f7; } 
						#legal > p{ font-size: 0.75em; text-align: center; } 
							#legal > p > a{ display: inline; color: #fe9909; line-height: 1.25; text-decoration: underline; } 
							#legal > p > a:hover{ color: #fdca40; } 
	}
	/* Bricks */ 
	@media (min-width: 200px){ 
		html{ font-size: 4vw; } 
			body{  } 
	} 
	/* Smartphones */ 
	@media (min-width: 300px){ 
		html{  } 
			body{  } 
	} 
	/* Retina */ 
	@media (min-width: 479px){ 
		html{ font-size: 120%; } 
			body{  } 
	} 
	/* Tablet */ 
	@media (min-width: 768px){ 
		html{  } 
			body{  } 
				#body{  } 
					#resources{  } 
						#modules{ overflow: hidden; } 
							#modules > .module{ float: left; width: 50%; } 
								#modules > .module > h3{ text-align: left; } 
								#modules > .module:nth-child(odd) > h3{ text-align: right; } 
								#modules > .module > p{  }  
								#modules > .module:nth-child(odd) > p{ text-align: right; } 
								#modules > .module > ul{  } 
									#modules > .module > ul > li{  } 
									#modules > .module:nth-child(odd) > ul > li{ text-align: right; } 
										#modules > .module > ul > li > a{  } 
	} 
	/* Desktop */ 
	@media (min-width: 979px){ 
		html{  } 
			body{  } 
				#body{  } 
					#resources{  } 
						#modules{  } 
							#modules > .module{ width: 25%; } 
								#modules > .module > h3{ text-align: left; } 
								#modules > .module:nth-child(odd) > h3{ text-align: left; } 
								#modules > .module > p{  } 
								#modules > .module:nth-child(odd) > p{ text-align: left; } 
								#modules > .module > ul{  } 
									#modules > .module > ul > li{  } 
									#modules > .module:nth-child(odd) > ul > li{ text-align: left; } 
										#modules > .module > ul > li > a{  } 
	} 
	/* Widescreen */ 
	@media (min-width: 1800px){ 
		html{ font-size: 1.067vw; } 
			body{  } 
	} 
	/* Max */ 
	@media (min-width: 2800px){ 
		html{ font-size: 186.7%; } 
			body{  } 
	} 
              
            
!

JS

              
                /* Pre-document load */ 
	/* Preload */ 
	$("body").addClass("js"); 

/* Post-document load */ 
	$(document).ready(function(){ 
		/* Events */ 
			$("#header").append("<div id='hamburger'>Menu</div>"); 
			$("#hamburger").click(function(event){ 
				$("#hamburger").toggleClass("active"); 
				$("#navigation").toggleClass("active"); 
				$("#close").toggleClass("active"); 
				event.preventDefault(); 
			}); 
			$("body").append("<div id='close'>Close</div>"); 
			$("#close").click(function(event){ 
				$("#hamburger").removeClass("active"); 
				$("#navigation").removeClass("active"); 
				$("#close").removeClass("active"); 
				event.preventDefault(); 
			}); 
			$("#page > ul > li > a").click(function(event){ 
				$("#splash").toggle(); 
				event.preventDefault(); 
			}); 
	}); 
              
            
!
999px

Console