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 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.


                <h1>Automated ARIA Role Assignment</h1>
  These examples are not responsive. They exist solely to demonstrate the functions.

<h2>Unordered List</h2>
  <li>4 cups of strawberries.</li>
  <li>1 tablespoon of sugar.</li>
  <li>3 tablespoons balsamic vinegar (higher-end stuff is best).</li>
  <li>¼ teaspoon of coarse-ground black pepper.</li>

<h2>Ordered List</h2>
  <li>Halve the strawberries (tossing away the leaves).</li>
  <li>Toss the strawberries with the balsamic vinegar, pepper, and the tablespoon of sugar.</li>
  <li>Cover and let stand 30 minutes.</li>
  <li>Stir before serving over scoops of vanilla ice cream.</li>

<h2>Definition / Description List</h2>
  <dd itemprop="recipeYield">Two quarts.</dd>
  <dd><time itemprop="totalTime" datetime="PT1H">1 hour.</time></dd>
  <dt>Calories for the entire batch</dt>
  <dd itemprop="totalCalories">~800 calories.</dd>


                body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  line-height: 1.4;
  /*   line-height: 1.5; */
  /*   letter-spacing: 0.12em; */
  /*   word-spacing: 0.16em; */


                function AddListARIA() {
  try {
    var allLists = document.querySelectorAll("ol, ul");
    for (var i = 0; i < allLists.length; i++) {
      allLists[i].setAttribute("role", "list");
    var allListItems = document.querySelectorAll("li");
    for (var i = 0; i < allListItems.length; i++) {
      allListItems[i].setAttribute("role", "listitem");
    var allDefLists = document.querySelectorAll("dl");
    for (var i = 0; i < allDefLists.length; i++) {
      allDefLists[i].setAttribute("role", "associationlist list");
    var allDefTerms = document.querySelectorAll("dt");
    for (var i = 0; i < allDefTerms.length; i++) {
      allDefTerms[i].setAttribute("role", "associationlistitemkey listitem");
    var allDefItems = document.querySelectorAll("dd");
    for (var i = 0; i < allDefItems.length; i++) {
      allDefItems[i].setAttribute("role", "associationlistitemvalue listitem");
  } catch (e) {
    console.log("AddListARIA(): " + e);