Pen Settings



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


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


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.


Auto Save

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.


                	<div class="wrapper">
		<div class="a">a</div>
		<div class="b">b</div>
		<div class="c">c</div>
		<div class="d">d</div>
		<div class="e">e</div>
		<div class="f">f</div>
		<div class="g">g</div>


                /* Based on "Composition II in Red, Blue, and Yellow," by Piet Mondrian (1930): */
.wrapper {
	width: 600px;
	height: 600px;
	display: grid;
	grid-template-rows: 170px 210px 61px 61px;
	grid-template-columns: 124px 376px 42px;
	gap: 30px 20px; 
	background-color: black;
div {
	border: 1px solid black;
	background-color: white;
  font-size: 2rem;
  font-family: Arial, sans-serif;
.c {
	grid-row: 1/ span 2;
	grid-column: 2/ span 2;
	background-color: #DE271D;
.d {
	grid-row: span 2;
	background-color: #015CA0;
	color: white;
.e {
	grid-row: span 2;
.g {
	background-color: #ECDB6B;

/* Notes on this notation:
	grid-row: 1/ span 2;
	grid-row: span 2;

In the first case, we are explicitly stating that this element should start at row line 1 and span two more rows.

In the second, we state that the element should span two rows from wherever it's placed.

Second -- here, we've pared back our layout directions to many fewer than in our first example. 

Grid will always try to lay out information from the upper left to the lower right (at least in left-to-right systems), with each grid item occupying one row and one column.

If you want to override that distribution, you must provide directions.