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.


  <h2>Reverse Ordered Lists with<br><code>start</code>, <code>type</code>, and <code>value</code> Attributes</h2>
  <p>Use the button below to toggle the <code>reversed</code> attribute on the ordered list. You can also use the radio buttons to select what "type" of ordered list this should be.</p>

  <ol start="20" type="1">
    <li>Typee: A Peep at Polynesian Life (1846)</li>
    <li>Omoo: A Narrative of Adventures in the South Seas (1847)</li>
    <li>Mardi: and a Voyage Thither (1849)</li>
    <li>Redburn: His First Voyage (1849)</li>
    <li value="100">White-Jacket; or, The World in a Man-of-War (1850)</li>
    <li>Moby-Dick; or, The Whale (1851)</li>
    <li>Pierre; or, The Ambiguities (1852)</li>
    <li>Isle of the Cross (1853 unpublished, and now lost)</li>
  <button>Toggle Reversed</button>
  <p class="btns"><input type="radio" name="typegroup" value="a" id="a"> <label for="a">Lowercase (a)</label><br>
  <input type="radio" name="typegroup" value="A" id="aa"><label for="aa">Uppercase (A)</label><br>
    <input type="radio" name="typegroup" value="i" id="i"><label for="i">Lower Roman (i)</label><br>
    <input type="radio" name="typegroup" value="I" id="ii"><label for="ii">Upper Roman (I)</label><br>
    <input type="radio" name="typegroup" value="1" id="one" checked><label for="one">Numeric (1)</label>



                body {
  font-family: Arial, sans-serif;
  font-size: 20px;
  padding: 0 20px;

main {
  text-align: center;
  margin: 0 auto;
  max-width: 800px;

p {
  text-align: center;
  padding: 0 20px;

code {
  color: firebrick;

ol {
  text-align: left;
  max-width: 600px;
  margin: 0 auto 20px;
  line-height: 1.3;

label {
  padding: 20px;

p.btns {
  line-height: 2;



let myList = document.querySelector('ol'),
    btns = document.querySelectorAll('.btns input');

document.querySelector('button').addEventListener('click', function () {
  if (document.querySelector('ol').getAttribute('reversed') === null) {
    document.querySelector('ol').setAttribute('reversed', '');
  } else {
}, false);

for (i of btns) {
  (function(i) {
    i.addEventListener('click', function() {
      document.querySelector('ol').setAttribute('type', i.value)