Template:Flatlist/doc
This is a documentation subpage for Template:Flatlist. It contains usage information, categories and other content that is not part of the original template page. |
Template:Used in system Template:Tlr This template provides a WCAG/ISO-standards-compliant accessible alternative to comma- or dash- (or other single character-) separated lists, per WP:FLATLIST and WP:HLIST.
Usage
{{flatlist}} (Usage) starts a horizontal list, such as:
This template can be used with or without {{endflatlist}} (Usage). For navigation boxes using {{navbox}} (Usage), one can set Template:Para, and achieve the same styling without using this template. For image captions, list (i.e. asterisk) markup does not work, so consider using {{hlist}} (Usage) instead.
Parameters
Examples
<syntaxhighlight lang="moin">
</syntaxhighlight>
produces:
Alternative syntax
<syntaxhighlight lang="moin"> Template:Startflatlist
</syntaxhighlight>
produces:
Syntax for ordered lists
<syntaxhighlight lang="moin">
</syntaxhighlight>
produces:
Using optional parameters
<syntaxhighlight lang="moin">
</syntaxhighlight>
produces:
Technical details
This template uses the .hlist
CSS class defined in MediaWiki:Common.css to generate horizontal lists. It causes ordinary html list items to be displayed inline (horizontally), where they would normally display as block elements (vertically). The class also generates the interpuncts between list items and parentheses around nested lists. Some of the CSS used is not compatible with some older browsers, notably Internet Explorer 6 and 7.
Wikitext | Expanded template | HTML |
---|---|---|
{{flatlist| * cat * dog * horse * cow * sheep * pig }} |
Template:Nowiki2 | <syntaxhighlight lang="html">
</syntaxhighlight> |
See also
- {{endflatlist}} (Usage)
- {{hlist}} (Usage)
- {{plainlist}} (Usage) and {{unbulleted list}} (Usage)
- {{bulleted list}} (Usage)
- {{ordered list}} (Usage)
- {{nowrap}} (Usage)
- {{pagelist}} (Usage)
- WP:HLIST