Template:Plainlist: Difference between revisions

no edit summary
(Created page with "<div class="plainlist {{{class|}}}" {{#if:{{{style|}}}{{{indent|}}}|style="{{#if:{{{indent|}}}|margin-left: {{#expr:{{{indent}}}*1.6}}em;}} {{{style|}}}"}}>{{#if:{{{1|}}}| {{{...")
 
No edit summary
Line 2: Line 2:
{{{1}}}
{{{1}}}
</div>}}
</div>}}
<noinclude>
This template provides a [[Web Content Accessibility Guidelines|WCAG]]/ISO-standards-compliant accessible alternative to <code><nowiki><br /></nowiki></code> separated lists, per [[WP:UBLIST]] and [[WP:PLIST]]
==Usage==
{{tl|plainlist}} starts a plain (i.e. unbulleted) list, such as:
{{plainlist|
* [[cat]]
* [[dog]]
* [[horse]]
* [[cow]]
* [[sheep]]
* [[pig]]
}}
It uses proper HTML list markup, which is more standards-compliant and more accessible than separating list items with {{tag|br|s}}. Detailed reasons for using this template can be found at [[WP:UBLIST]].
This template can be used with or without {{tl|endplainlist}}. It is an alternative to {{tl|unbulleted list}}, which performs the same function in a more concise but less wiki-style manner. Note that {{tl|unbulleted list}} will work inside image captions, whereas {{tl|plainlist}} does not.
==Examples==
{{Markup
|<nowiki>
{{plainlist|
* [[cat]]
* [[dog]]
* [[horse]]
* [[cow]]
* [[sheep]]
* [[pig]]
}}
</nowiki>
|
{{plainlist|
* [[cat]]
* [[dog]]
* [[horse]]
* [[cow]]
* [[sheep]]
* [[pig]]
}}
}}
=== Alternative syntax ===
{{Markup
|<nowiki>
{{plainlist}}
* [[cat]]
* [[dog]]
* [[horse]]
* [[cow]]
* [[sheep]]
* [[pig]]
{{endplainlist}}
</nowiki>
|
{{plainlist}}
* [[cat]]
* [[dog]]
* [[horse]]
* [[cow]]
* [[sheep]]
* [[pig]]
{{endplainlist}}
}}
===Optional parameters===
* '''class''' – adds a CSS class to the containing div.
* '''style''' – adds CSS style options. Complex styles should not be used in articles (per [[wp:deviations]]) but may be acceptable on user, project, and talk pages.
::Example: {{para|<var>style</var>|<var>border:solid 1px silver; background:lightyellow</var>}}
* '''indent''' – indents the list by a number of standard indents (one indent being 1.6em), particularly handy for inclusion in an indented discussion thread.
::Example: {{para|<var>indent</var>|<var>2</var>}}
=== Controlling line-breaking ===
Template {{tlx|nbsp}} may be used with {{tlx|wbr}} and {{tlx|nowrap}} to control line-breaking in bulletless lists, to prevent wrapped long entries from being confused with multiple entries. See [[Template:Wbr/doc#Controlling line-breaking in infoboxes]] for details.