(anonymous guest) (logged out)

Copyright (C) by the contributors. Some rights reserved, license BY-SA.

Sponsored by the Wiki Symposium and the Nuveon GmbH.

 
This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]

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:

  1. Item 1
  2. 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
    1. Item 2.1
    2. 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

Add new attachment

Only authorized users are allowed to upload new attachments.

« This particular version was published on 07-Sep-2006 15:41 by 80.254.169.243.