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.


<input type="checkbox" id="checkbox" name="checkbox" value="custom and accessible" checked>
<label for="checkbox">Custom and Accessible</label>


                @supports(appearance: none) {
/* 	AKA, only do this if `appearance: none` is supported. 
	Which means IE11 and Opera Mini will get the old browser-styled checkbox. Which works just fine. Old browsers can get old looking things. */
 	input[type="checkbox"] {
		appearance: none;
		/* Style the box. */
		width: 1.6rem;
		height: 1.6rem;
		border: 1px solid #808080;
 	input[type="checkbox"]:checked {
		/* Prepare for placing the new checkmark. */
		position: relative;
		/* Do a bug fix to keep iOS from adding dark background. */
		background: none;
	input[id="checkbox"]:checked::after {
		/* Place (position) the new checkmark. */
		position: absolute;
		top: 0.36rem; 
		left: 0.12rem;
		/*  Create a checkmark in CSS. 
			Could use an SVG or `content: "✓";` instead. 
			This is a box, turned 45 degs, with a 
			left and bottom border to make the checkmark.
			Created using an empty pseudo-element.*/
		content: "";
		width: 1.0rem;
		height: 0.3rem;
		border: 4px solid black;
		border-right: none;
		border-top: none;
		transform: rotate(-45deg);

/* Add a bit of styling to the page & typography. Totally optional. */
body {
	margin: 2rem;
	font-family: Avenir, Roboto, sans-serif;

/* Tweek the vertical alignment. 
   Might not be needed given the layout context on your site. */
div {
	/* If Grid is not supported, all of this code will do nothing. 
	   All will be fine. Nothing will explode. Just won't be as pretty. */
	display: grid; 
	grid-template-columns: min-content 1fr; 
	gap: 0.6rem; 
	align-items: center;
label { 
	padding-top: 0.2rem;