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


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.


                <p>Take a look at your browser console (not the CodePen one)!</p>




Exploration of the console API. 
Focusing on the difference between console.log() and console.dir()

Read more about the API here:

// This is to stop CodePen repeating itself too much.

// Utility function that wraps the output in a for easy reading.
function test_console( group_name, test_case ){
	let name = ( group_name ? group_name : 'Group' );

	console.log('%c console.dir:', 'background: #ccc');
	console.log('%c console.log:', 'background: #eee');


let object_example = {
	'name': 'foo',
	'property' : 'value',
	'boolean': true,
	'number': 123012312

test_console('Object Example', object_example);

const array_example = [0,2,4];

test_console('Array Example', array_example);

const regex_example = /foo/;

test_console('Regex Example', regex_example);

const function_example = function example_function(a, b) {
	let c = a + b;
	return c;

test_console('Function example', function_example);