Changes

Jump to navigation Jump to search
2,743 bytes added ,  22:06, 30 June 2015
m
1 revision imported
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AT THE BOTTOM OF THIS PAGE -->

{{#ifeq:{{FULLPAGENAME}} | Template:Plainlist | {{high-use|67,000+}} }}
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==
<pre><nowiki>
{{plainlist|
* [[cat]]
* [[dog]]
* [[horse]]
* [[cow]]
* [[sheep]]
* [[pig]]
}}
</nowiki></pre>

{{plainlist|
* [[cat]]
* [[dog]]
* [[horse]]
* [[cow]]
* [[sheep]]
* [[pig]]
}}

===Alternative syntax:===
<pre><nowiki>
{{plainlist}}
* [[cat]]
* [[dog]]
* [[horse]]
* [[cow]]
* [[sheep]]
* [[pig]]
{{endplainlist}}
</nowiki></pre>

{{plainlist}}
* [[cat]]
* [[dog]]
* [[horse]]
* [[cow]]
* [[sheep]]
* [[pig]]
{{endplainlist}}

==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>}}

==Technical details==
{{tl|Plainlist}} works by constructing a div with the CSS class "plainlist" which has the following style:
<source lang="css">
.plainlist ul {
line-height: inherit;
list-style: none none;
margin: 0;
}
.plainlist ul li {
margin-bottom: 0;
}
</source>

==Redirects==
* {{tl|Startplainlist}}

==See also==
* {{tl|unbulleted list}}
* {{tl|flatlist}} and {{tl|hlist}} (Replacements for comma- or dash-separated lists)
* {{tl|ordered list}} and {{tl|unordered list}}

<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
[[Category:Typing-aid templates|Plainlist]]
[[Category:List formatting and function templates|Plainlist]]
}}</includeonly>

Navigation menu