|
|
| Line 123: |
Line 123: |
|
| |
|
| Do not separate list items with line breaks ({{tag|br|o}}). | | Do not separate list items with line breaks ({{tag|br|o}}). |
|
| |
| ==== Horizontal lists ====
| |
| {{shortcut|MOS:HLIST}}
| |
|
| |
| For lists running across the page, and in single rows in infoboxes and other tables, the templates {{tl|flatlist}} and {{tl|hlist}} ("h[orizontal]list") are available to improve accessibility and semantic meaningfulness. This feature makes use of the correct HTML markup for each list item, rather than including bullet characters which, for example, are read out (e.g., "dot cat dot dog dot horse dot...") by the assistive software used by people who are blind. The templates differ only in the wiki-markup used to create the list. Note that because these are templates, the text of each list item cannot contain the vertical bar symbol ( | ) unless it is replaced by <code><nowiki>{{!}}</nowiki></code> or is contained within {{tag|nowiki}} tags.
| |
|
| |
| <!-- The following examples deliberately wrap the list over two lines to show the position of the list separator.
| |
| Please don't widen them. -->
| |
| {| class="wikitable"
| |
| |+ Example of flatlist
| |
| ! style="width:11.7em;" | Wikitext
| |
| ! style="width:11.7em;" | Renders as
| |
| |-
| |
| | <pre style="line-height:1.2em;">{{flatlist |
| |
| * White rose
| |
| * Yellow rose
| |
| * Pink rose
| |
| * Red rose
| |
| }}</pre>
| |
| | {{flatlist |
| |
| * White rose
| |
| * Yellow rose
| |
| * Pink rose
| |
| * Red rose
| |
| }}
| |
| |}
| |
|
| |
| {| class="wikitable"
| |
| |+ Example of hlist
| |
| ! style="width:11.7em;" | Wikitext
| |
| ! style="width:11.7em;" | Renders as
| |
| |-
| |
| | <pre style="line-height:1.2em;">{{hlist
| |
| | White rose
| |
| | Yellow rose
| |
| | Pink rose
| |
| | Red rose
| |
| }}</pre>
| |
| | {{hlist
| |
| | White rose
| |
| | Yellow rose
| |
| | Pink rose
| |
| | Red rose
| |
| }}
| |
| |}
| |
|
| |
| Alternatively, in templates such as Navboxes and the like, or any suitable container, such lists may be styled with the class <code>hlist</code>, thus:
| |
| {{plainlist |
| |
| * <code><nowiki>| listclass = hlist</nowiki></code> or
| |
| * <code><nowiki>| bodyclass = hlist</nowiki></code>
| |
| }}
| |
|
| |
| In infoboxes:
| |
| {{plainlist |
| |
| * <code><nowiki>| rowclass = hlist</nowiki></code> or
| |
| * <code><nowiki>| bodyclass = hlist</nowiki></code>
| |
| }}
| |
|
| |
| may be used. {{crossref|See [[WP:NAV]] for more details on Navigation templates.}}
| |
|
| |
|
| === Tables === | | === Tables === |