Template:Endflatlist
| This template is used in MediaWiki:Pageinfo-header, and on approximately 292,000 pages. Changes to it can cause immediate changes to the Wikipedia user interface. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Please discuss changes on the talk page before implementing them. |
| This template can only be edited by administrators because it is transcluded onto one or more cascade-protected pages. |
| This template uses TemplateStyles: |
This template provides a WCAG/ISO standards-compliant accessible alternative to comma-, dash- or other single character-delimited lists, per Manual of Style/Lists § Horizontal lists and Manual of Style:Accessibility § Horizontal lists.
Lists output by {{Flatlist}} and {{Hlist}} are semantically and visually identical, differing only in the underlying wiki-markup they expect as input to create the lists.
Usage
{{Flatlist}} starts a horizontal list, such as:
If this template is used with no parameters, {{Endflatlist}} is required. For navigation boxes using {{Navbox}}, one can set |listclass=hlist and achieve the same styling without using this template. For image captions, list (i.e. leading asterisk) markup does not work, so consider using {{Hlist}} instead.
Parameters
TemplateData for Endflatlist
Ends a flat list created by {{[[Template:Flatlist|Flatlist]]}}.
| Parameter | Description | Type | Status | |||
|---|---|---|---|---|---|---|
| No parameters specified | ||||||
Examples
{{Flatlist|
* [[cat]]
* [[dog]]
* [[horse]]
* [[cow]]
* [[sheep]]
* [[pig]]
}}
…produces:
Alternative syntax
{{Startflatlist}}
* [[cat]]
* [[dog]]
* [[horse]]
* [[cow]]
* [[sheep]]
* [[pig]]
{{Endflatlist}}
…produces:
Syntax for ordered lists
{{Flatlist|
# [[first]]
# [[second]]
# [[3|third]]
# [[fourth]]
# [[fifth]]
# [[sixth]]
}}
…produces:
Using optional parameters
{{Flatlist|indent=2|class=nowraplinks|style=background-color: var(--background-color-notice-subtle, lightgray); border: thin solid silver; color: var(--color-base, black);|
* [[Alpine skiing at the 1936 Winter Olympics]]
* [[Alpine skiing at the 1948 Winter Olympics]]
* [[Alpine skiing at the 1952 Winter Olympics]]
* [[Alpine skiing at the 1956 Winter Olympics]]
* [[Alpine skiing at the 1960 Winter Olympics]]
* [[Alpine skiing at the 1964 Winter Olympics]]
}}
…produces:
Technical details
This template uses the .hlist CSS class defined in Template:Hlist/styles.css to generate horizontal lists. It causes ordinary HTML list items to be displayed inline (horizontally), where normally they would be displayed as block elements (vertically). The class also generates the interpuncts between list items and parentheses around nested lists.
| Wikitext | Expanded template | HTML |
|---|---|---|
{{Flatlist|
* cat
* dog
* horse
* cow
* sheep
* pig
}}
|
'"`UNIQ--templatestyles-00000026-QINU`"'<div class="hlist " > * cat * dog * horse * cow * sheep * pig </div> |
<div class="hlist"><ul>
<li>cat</li>
<li>dog</li>
<li>horse</li>
<li>cow</li>
<li>sheep</li>
<li>pig</li>
</ul></div>
|
Maintenance categories
See also
- {{Endflatlist}}
- {{Hlist}}
- {{Plainlist}} and {{Unbulleted list}}
- {{Bulleted list}}
- {{Ordered list}}
- {{Nowrap}}
- {{Pagelist}}
- Manual of Style:Accessibility § Horizontal lists
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.
