Bold, italics, links, pre can be embedded in lists. Whitespace is optional before and after the - or # character.
Unordered Lists#
These lists are usually also refered to as bullet lists, however this term is misleading because with css you can format it as bold dashes as well...
Creole:
- Item 1 - Item 2
Recommended HTML:
<ul> <li>Item 1</li> <li>Item 2</li> </ul>
Output:
- Item 1
- Item 2
WikiMatrix unordered list syntax comparison
Ordered Lists#
Creole:# Item 1 # Item 2
Recommended HTML:
<ol> <li>Item 1</li> <li>Item 2</li> </ol>
Output:
- Item 1
- Item 2
Nesting#
Lists can be nested:
Creole:
- Item 1 - Item 2 -- Item 2.1 -- Item 2.2
Recommended HTML:
<ul> <li>Item 1</li> <li>Item 2</li> <ul> <li>Item 2.1</li> <li>Item 2.2</li> </ul> </ul>
Output:
- Item 1
- Item 2
- Item 2.1
- Item 2.2
Mixing#
Nested lists can be mixed by repeating the list item character multiple times:
Creole:
- Item 1 - Item 2 ## Item 2.1 ## Item 2.2
Recommended HTML:
<ul> <li>Item 1</li> <li>Item 2</li> <ol> <li>Item 2.1</li> <li>Item 2.2</li> </ol> </ul>
Output:
- Item 1
- Item 2
- Item 2.1
- Item 2.2
Leading Whitespace#
People like Alex argued against allowing leading whitespace, citing the markup for Headings as a counter example. People like Christoph, Alain and Radomir however reported that users will indent lists. The output then confuses non-technical people and requires a certain amount of handholding.
Note that leading whitespace has no effect on the nesting of the list item. The number list item character repetitions determines the nesting level.
Creole:
- Item 1 - Item 2 -- Item 2.1 -- Item 2.2
Recommended HTML:
<ul> <li>Item 1</li> <li>Item 2</li> <ul> <li>Item 2.1</li> <li>Item 2.2</li> </ul> </ul>
Output:
- Item 1
- Item 2
- Item 2.1
- Item 2.2
WikiMatrix#
WikiMatrix ordered list syntax comparison
Also see: All Markup