Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                <h1>
  Faking native ordered
</h1>

<h2>A native <code>ol</code></h2>
<ol>
	<li>test
	<li>test again
</ol>


<h2>An ARIA <code>role=list</code> with CSS counters</h2>
<div role="list" class="counters">
	<div role="listitem">
		Test
	</div>
	<div role="listitem">
		Test again
	</div>
</div>

<h2>An ARIA <code>role=list</code> with CSS counters that are visually hidden</h2>
<div role="list" class="counters hidden-counters">
	<div role="listitem">
		Test
	</div>
	<div role="listitem">
		Test again
	</div>
</div>
              
            
!

CSS

              
                .counters {
  counter-reset: listing;
}

[role="listitem"]:before {
	counter-increment: listing;
  content: counter(listing) ".";
}

.hidden-counters [role="listitem"]:before {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}




/**
  demo styling
*/
body {
  padding: 2em;
  font-size: 100%;
  font-family: helvetica, arial;
}

h2:not(:first-of-type) {
  margin-top: 1.5em;
  padding-top: 1.5em;
  border-top: 1px solid #888;
}
              
            
!

JS

              
                /**
  Appending the CSS counter to the role=listitem elements provides comparable orderd list announcements to a native OL > LI markup pattern.
  
  Note that IE does not announce the CSS counters with JAWS, and that some browser + AT combinations may not announce the counters consistently, when navigating by virtual cursor.
*/
              
            
!
999px

Console