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.


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.


                <!-- toggle dark mode using the top right checkbox -->

<h1>A Cat On The Internet</h1>
	<img src="" alt="">
	The domestic cat is a small, typically furry, carnivorous mammal. They are often called house cats when kept as indoor pets or simply cats when there is no need to distinguish them from other felids and felines. They are often valued by humans for companionship and for their ability to hunt vermin. There are more than seventy cat breeds recognized by various cat registries.
	<a href="">About cats</a>

<div class="dark-mode-switch">
	<input id="dark-mode" type="checkbox" onclick="document.documentElement.classList.toggle('dark-mode')">	
	<label for="dark-mode">Dark mode</label>


 * Dark mode
html.dark-mode {
	filter: invert(100%) hue-rotate(180deg);
	img {
		filter: invert(100%) hue-rotate(180deg);

html, body {
	color: #222;
	background-color: #fff;
	height: 100%;

 * To make things look better
.dark-mode-switch {
	position: fixed;
	right: 1rem;
	top: 1rem;
	padding: .5rem 1rem;
	background-color: #ddd;

img {
	float: left;
	max-width: 40%;
	margin-right: 2em;

body {
	padding: 1em 2em;

p {
	max-width: 40em;

h1 {
	font-family: Georgia, Times, Times New Roman, serif;

html {
	margin: 0;
	padding: 0;
	line-height: 1.5;