Help:List

Lists are a way of organizing and ordering data. This page will explain how to create and edit lists on.

List basics
There are three types of lists: unordered lists, ordered lists, and definition lists (or description lists).

Common mistakes
There must not be any blank lines between list items. A blank line terminates a list, and any list entries created afterwards will be considered to be part of a different list. This is most noticeable when using ordered lists and will affect the underlying HTML code, which may cause issues with some screen readers.

In order to be a list, each line must begin the same way. Starting a line differently will cause it to be interpreted as a different list. This also affects the underlying HTML and may also cause issues with screen readers.

Don't use a semicolon to simply give a list (or anything else, for that matter) a title. Semicolons and colons make up one kind of list; asterisks and number signs make another. This will (again) affect the underlying HTML and causes issues with screen readers.

Paragraphs and other breaks
For simplicity, lists in wiki markup can't be longer than a paragraph. A single line break will end the list entry, and the entire list will be ended if the line doesn't start with the same character as the list. This is most noticeable with ordered lists, where the numbering will get reset if this happens. For unordered lists, the effect may not appear to be noticeable on-screen, but it will cause issues with screen readers and is bad for accessibility.

The best way to create paragraphs inside list items is to use the  HTML tags, with no line breaks in the wiki markup.

If it would be useful to have line breaks, in the wiki markup of the page, such as if the paragraphs are very long, you can use HTML comments to accomplish this. The comments must start at the end of one line and end at the start of another.

For a single line break, you can use a single  tag. This is useful where nested lists are not desired.

You can also add block quotations to lists without breaking them.

Continuing a list item after a sub-item
In HTML, a list item may contain several sublists, not necessarily adjacent; thus there may be parts of the list item not only before the first sublist, but also between sublists, and after the last one. However, in wiki markup, sublists follow the same rules as sections of a page: the only possible part of the list item not in sublists is before the first sublist.

In the case of an unnumbered first-level list in wikitext code this limitation can be overcome by splitting the list into multiple lists. Indented text between the partial lists may visually serve as part of a list item after a sublist. However, this may give, depending on CSS, a blank line before and after each list, in which case, for uniformity, every first-level list item could be made a separate list.

Numbered lists illustrate that what should look like one list may, for the software, consist of multiple lists; unnumbered lists give a corresponding result, except that the problem of restarting with 1 is not applicable.

Going one level deeper, with a sublist item continuing after a sub-sublist, will produce even more blank lines; however, the continuation of the first-level list is not affected:

Changing the list type
The list type determines what kind of marker is used before the list item. It can be changed using the list-style-type CSS property.

Extra indentation of lists
Lists are indented by 3.2em by default. In a numbered list in a large font, some browsers do not show more than two digits of indentation unless extra indentation is applied (if there are multiple columns, for each column). This can be fixed by increasing the indentation an additional 2em.

The easiest way to do this is to add  or   tags around wiki markup list items. The parser translates a list without any list items into a, which causes indentation. This is good for most cases, but it doesn't allow you to start an ordered list with a number other than 1.

The best way to create an indented list is to use full HTML instead of wiki markup. Although not the easiest, it works well for both basic and complex lists; doesn't produce invalid HTML; and allows ordered lists to start with a number other than 1.

Avoid using definition lists for indenting other lists. This technique works in a hurry, but produces poorly formed HTML and causes accessibility issues.

Specifying a starting value
You can have an ordered list start on a different number other than 1. This can be accomplished using HTML. Only the list item whose value is being changed needs to use HTML; the rest can use regular wiki markup.

Alternatively, you can use all HTML for the list.

Multi-column lists
You can use the Columns-list to add columns to a list.

This is the general solution. Other solutions that also work include using the Col-begin, Col-break, and Col-end templates...

...or using HTML.

Tables
A one-column table is very similar to a list, but it allows sorting. If the wiki markup itself is already sorted with the same sortkey, this advantage does not apply. A multiple-column table allows sorting on any column.

{| style="width:100%;" !scope="col" style="width:50%;"| You type !scope="col" style="width:50%;"| You get
 * style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"| 
 * style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"| 
 * style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|


 * style="width:50%; border-width:1px;border-style:solid none none none;border-color:#ddd; padding:5px; vertical-align:top;"|
 * style="width:50%; border-width:1px;border-style:solid none none none;border-color:#ddd; padding:5px; vertical-align:top;"|
 * style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"| 
 * style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"| 
 * style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"| 
 * style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|


 * style="width:50%; border-width:1px;border-style:solid none none none;border-color:#ddd; padding:5px; vertical-align:top;"|
 * style="width:50%; border-width:1px;border-style:solid none none none;border-color:#ddd; padding:5px; vertical-align:top;"|
 * }
 * }