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.


                <h1>I really want <div>my heading to be on two lines</div></h1>
<p><div>hi there</p> <!-- invalid to nest a div in a paragraph, and missing a closing </div> -->

<!-- invalid nesting of a link within a button -->
<button aria-pressed=false><a href= target=_blank>let's do something</a> (but what?)</button>

<div class=notes>
	Navigating with virtual cursor (JAWS/NVDA - down arrow), there will be 'two' h1s - "to test" and "things".  Navigating by the <b>H</b> key alone, there is a single heading.
	<p>Navigating to the button with the virtual cursor, Narrator, NVDA and JAWS will not announce the existence of the invalid nested link.  Navigating to the link with the Tab key there can be <strong>no announcement</strong> of the focused link text or role.  Attempting to activate while the screen reader is on will result in <strong>no action</strong> taking place.  In contrast to this, without a screen reader enabled a user can keyboard tab to the invalid nested link and the link will properly function.</p>


                body {padding: 1.5em}
button[aria-pressed=true] {
	background: #000;
	color: #fff;
	a {
		color: #fff;

*:focus {
	outline: 2px solid #f00;
	outline-offset: 1px;

.notes {
	margin: 1em 0;
	max-width: 600px;


                document.querySelector('button').addEventListener('click', function () {
	if ( this.getAttribute('aria-pressed') === 'false') {
		this.setAttribute('aria-pressed', 'true')
	else {
		this.setAttribute('aria-pressed', 'false')