Numbered (ordered) lists

Make an ordered (numbered) list of items. Each item is preceded by a hash sign #.

Textile example: Numbered (ordered) lists

# Item one
## Item one-a
## Item one-b
# Item two
# Item three

Textile input (editable)

Browser output

HTML output


More about: Numbered (ordered) lists

1. Mixed lists:

* This is a bullet
## this is the start of an enumerated list within a bulleted list
## this is another item list of an enumerated list within a bulleted list
*** this is another level
*** and another bullet
* This is another bullet at level 1

2. Attributes can be applied to individual list items, or to the list itself:

When a class, id, lang, style attribute modifier is put on the very first item in the list, then the markup will be applied to the container.

For example:

#(class#id) Item 1
# Item 2
# Item 3

Renders:

<ol class="class" id="id">
    <li>Item 1</li>
    <li>Item 2</li>
    <li>Item 3</li>
</ol>

But if you also wish to put a class attribute on individual items in the list, you simply make the first list item end with a . dot immediately after the attributes. That holds the container modifiers, and then proceed as normal.

For example:

#(class#id).
#(first) Item 1
#(second) Item 2
#(third) Item 3

Renders:

<ol class="class" id="id">
    <li class="first">Item 1</li>
    <li class="second">Item 2</li>
    <li class="third">Item 3</li>
</ol>

You can put the class, id, lang, style attribute modifiers on any list item; this works for ordered, unordered and definition lists.

Note: Due to the way the lists are processed, you need a . after the attributes of your ‘empty’ list item to trigger the correct behaviour.

3. For continuation of a list’s numbering from where you previous ordered list finished, you can let Textile know using the continuation character:

#8 Enumerated list, starting by number eight
# List item No. 9

Some text paragraph

#_ Continuing list item, numbered as 10
# Item 11

Further reading: Numbered (ordered) lists

  1. MDN: The HTML <ol> element

See something wrong in this page? Outdated info, a broken link, faulty code example, or whatever? Please write an issue and we’ll fix it.