Pen Settings



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


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


Add Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import or require. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.


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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

              <h1>Grid layouts</h1>
<p>Grid layouts aren't limited to living inside of a <strong><code>&lt;DIV&gt;</code></strong>.  We can put them inside lists, too:  Unordered lists <strong><code>&lt;ul&gt;</code></strong> and and ordered lists <strong><code>&lt;ol&gt;</code></strong> are both good candidates for this approach.  Let's take a look at how this works...   
<h2>Plain <strong><code>&lt;ul&gt;</code></strong></h2>
<p>Every letter below is just another <strong><code>&lt;li&gt;</code></strong>:</p>
	&lt;li&gt; A. &lt;/li&gt;
	&lt;li&gt; B. &lt;/li&gt;
	&lt;li&gt; C. &lt;/li&gt;
<h2>Gridded <strong><code>&lt;ul&gt;</code></strong></h2>
<p>In this example, I've added a class, "gridContainer", to the unordered-list selector, so that the HTML looks like this:</p>
<pre><code> &lt;ul class="gridContainer"&gt; </code></pre>
<p>And in the .CSS, I've added the following:</p>
<pre><code> .gridContainer{
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	list-style: none;
<p>That last line of the class is a property that keeps an outline from using bullet-points.  Very handy.</p>
<ul class="gridContainer">
<br />
<p>Manipulating the grid from here is easy.  You'll likely want to edit the <strong><code>.gridContainer</code></strong> class I created in the .CSS.  </p>
<p>Start by changing it from a 3-column grid to a 2-column grid.</p>
<p>Then change it from a grid with 2 columns of uniform width to a grid with 4 columns, all of different widths.  Try mixing up your units of measure:  px, em, %, vw.</p>

ul {

li {
	background-color: white;

.gridContainer {
	border:2px solid black;

	list-style: none;
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;

/* Styling stuff that isn't
directly related to my explanations, above. */

body {
	background: #f6f3ea;
	vh is a unit of measure that means
	"viewport height."  Think of it as meaning
	n% of the height of your browser's height.
	vw is similar:  "viewport width."  It
	translates to roughly n% of your
	browser's window's width. */

   margin:2vh 20vw; */
	/* ^ ^ ^ So the line above means:
	set the top margin of <body> to
	2% of my window height; the bottom
	margin of <body> to 2% of window
	height; the left margin of <body>
	to 20% of my window's width; and
	the right margin of <body>
	to 20% of my window's width.*/
	/*Remember that this:
		margin:10px 20px;
	really means this:
		Set margin-top and margin-bottom to 10px;
		Set margin-left and margin-right to 20px;
	but it can also look like this:
		margin: 10px 20px 10px 20px;
	Because when you don't use the full "margin-top:", "margin-left" format, the computer always reads the data in the following order:
		-top, -right, -bottom, -left;
	Which can be confusing.  Try thinking of it this way:  
			all values:
	1 value -> everything is the same;
			paired values:
	2 values -> top&bottom, and then left&right;
			clockwise values:
	4 values -> top, right, bottom, and left;

* {
	box-sizing: border-box;
	margin: 0px;
	padding: 0px;

h1 {

h2 {

strong code{
	background-color: firebrick;
	color: white;
	padding: 1px 5px;
	margin: 2px;
	border-radius: 3px;

p {
	line-height: 160%;

pre {