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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <!-- This is a comment in HTML -->
<body>	
	<aside class="widget-area">
		<section class="widget widget_recent_posts">
			<h2 class="widget-title">Current Color and Clickable Dummy Links</h2>
			<p>This paragraph is showing with blue text because I set the element, "body" element to "color: blue;". Below, I set the borders of the buttons to have the color, "currentColor" and they inherit the color of whatever their container is. </p>
			<p>If I uncomment the "color: red;" that is applied to the "ul"(unordered list) in the CSS, then the borders will inherit red.</p>
			<ul>
				<!-- I used "#0" for these dummy links instead of "#" so that they're clickable -->
				<li><a href="#0">Button 1</a></li>
				<li><a href="#0">Button 2</a></li>
				<li><a href="#0">Button 3</a></li>
				<li><a href="#0">Button 4</a></li>
			</ul>
			<p>The links above are clickable but don't take you back to the top of the page. I used "#0" instead of "#" for the URL. 
			<p class="note">CREDITS: I learned the "currentColor" trick from <a href="https://michaelrog.com/">Michael Rog</a> and the clickable dummy links trick came from <a href="http://www.standardista.com/">Estelle Weyl</a>. Both spoke at the 2017 <a href="https://blog.cssdevconf.com/">CSSDevConf</a>.
		</section>
	</aside>

</body>
              
            
!

CSS

              
                /* This is a comment in CSS. It can go 
on multiple lines. */

html {
	font-size: 18px;
}
body { 
	color: blue;
	font-size: 1rem;
}
.widget-area {
	padding: 20px;
}
h2.widget-title {
	text-transform: uppercase;
}
ul { 
	list-style-type: none;
	padding: 10px 0;
	display: flex;
	justify-content: space-evenly;
	background-color: #dddddd; /* this is a light gray hexidecimal color - you can use #ddd instead */
	/*color: red;*/
}
li {
	border: 2px solid currentColor;
	text-align: center;
	padding: 10px;
}
.note {
	color: #888;
}
              
            
!

JS

              
                
              
            
!
999px

Console