burger menu icon
WillMaster

WillMasterBlog > Content Protection

FREE! Coding tips, tricks, and treasures.

Possibilities weekly ezine

Get the weekly email website developers read:

 

Your email address

name@example.com
YES! Send Possibilities every week!

Reverse List Numbering

The numbers that mark ordered lists can be reversed. The list items don't reverse. Just the numbering.

Original numbers:

  1. Position firecracker
  2. Light the fuse
  3. Skedaddle
  4. Boom

Reversed numbers:

  1. Position firecracker
  2. Light the fuse
  3. Skedaddle
  4. Boom

It works with other numbering types, too:

  1. Position firecracker
  2. Light the fuse
  3. Skedaddle
  4. Boom
  1. Position firecracker
  2. Light the fuse
  3. Skedaddle
  4. Boom

Shortly, I'll reveal how to recreate the examples. But first, let's start the numbering at 8 instead of 1. For starting at the number 8, regular order numbers are 8 to 11, and reverse order is 8 to 5.

  1. Position firecracker
  2. Light the fuse
  3. Skedaddle
  4. Boom
  1. Position firecracker
  2. Light the fuse
  3. Skedaddle
  4. Boom
  1. Position firecracker
  2. Light the fuse
  3. Skedaddle
  4. Boom
  1. Position firecracker
  2. Light the fuse
  3. Skedaddle
  4. Boom
  1. Position firecracker
  2. Light the fuse
  3. Skedaddle
  4. Boom
  1. Position firecracker
  2. Light the fuse
  3. Skedaddle
  4. Boom

Nifty, huh?

It's not generally used. When it's needed, though, it's elementary to implement.

In fact, it's so simple that all you have to do is insert one word into the <ol> tag: reversed

That's right, just the one-word attribute reversed. Example:

<ol reversed>

For the other variations in the examples, to specify a start number, use the start attribute.

<ol start="8" reversed>

To change the numbering, use the type attribute. Here is a list and an example.

type="1" (regular numbering)
type="i" (lowercase Roman numerals)
type="I" (uppercase Roman numerals)
type="a" (lowercase letters)
type="A" (uppercase letters)

<ol start="8" reversed type="i">

The purpose of this article is to show (or remind) how to publish reversed numbering for an ordered list.

Remember reversed and you're good to go.

(This content first appeared in Possibilities newsletter.)

Will Bontrager

Was this blog post helpful to you?
(anonymous form)

Support This Website

Some of our support is from people like you who see the value of all that's offered for FREE at this website.

"Yes, let me contribute."

Amount (USD):

Tap to Choose
Contribution
Method


All information in WillMaster Blog articles is presented AS-IS.

We only suggest and recommend what we believe is of value. As remuneration for the time and research involved to provide quality links, we generally use affiliate links when we can. Whenever we link to something not our own, you should assume they are affiliate links or that we benefit in some way.

Recent Articles in the Library

JavaScript-Formatted Date and Time

A JavaScript function to publish date/time according to your custom format.

Friendly Anchor Link

How to insert a bit of space above a normal anchor link scroll position.

Form Field Prefill With a Tap

When a link is tapped, a form field is filled in.

Beacon

Send a beacon to your script. Optionally, also send information.

Digging for an IP Address

While an app's IP address can always be found in the REMOTE_ADDR value, the value might not be the actual destination of the content retrieved from your website.

Simple CSS Rotate

Rotate divs, tables, and even characters. Specify the number of degrees or fraction of a turn, and you're good to go.

Avoid Expired SSL Certificate

Check the expiration date of your domain's SSL certificate

How Can We Help You? balloons
How Can We Help You?
bullet Custom Programming
bullet Ready-Made Software
bullet Technical Support
bullet Possibilities Newsletter
bullet Website "How-To" Info
bullet Useful Information List

© 1998-2001 William and Mari Bontrager
© 2001-2011 Bontrager Connection, LLC
© 2011-2026 Will Bontrager Software LLC