Template:Endflatlist
| This template is used on 80,000+ pages. To avoid large-scale disruption and unnecessary server load, any changes to this template should first be tested in its /sandbox or /testcases subpages, or in your own user subpage. The tested changes can then be added to this page in one single edit. Please consider discussing any changes on the talk page before implementing them. |
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}} starts a horizontal list, such as:
This template can be used with or without {{endflatlist}}. 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. asterisk) markup does not work, so consider using {{hlist}} instead.
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]]
# [[third]]
# [[fourth]]
# [[fifth]]
# [[sixth]]
}}
produces:
Parameters
- class adds a CSS class to the containing div. Use nowraplinks to prevent links from wrapping.
- style adds CSS styling to the containing div. Complex styles should not be used in articles (per WP:Deviations) but may be acceptable on user, project and talk pages.
- Example:
|style=border:solid 1px silver; background:lightyellow
- Example:
- indent indents the list by a number of standard indents, one indent being 1.6em. (Useful in an indented discussion thread.)
- Example:
|indent=2
- Example:
Technical details
This template uses the .hlist CSS class defined in 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 all browsers, notably Internet Explorer 6 and 7.
Redirects
- {{Startflatlist}}
See also
- {{hlist}}
- {{plainlist}} and {{unbulleted list}}
- {{ordered list}} and {{unordered list}}
- {{multi-column numbered list}}
- {{nowrap}}
- {{pagelist}}
- WP:HLIST
| The above documentation is transcluded from Template:Flatlist/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Subpages of this template. |
Debug data:
[SQLBagOStuff] MainObjectStash using store ReplicatedBagOStuff[objectcache] MainWANObjectCache using store EmptyBagOStuffIP: 216.73.216.112Start request GET /mediawiki/Template:Endflatlist
HTTP HEADERS:
CONTENT-TYPE:
CONTENT-LENGTH: 0
X-ORIGINAL-URL: /mediawiki/Template:Endflatlist
USER-AGENT: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HOST: zero-k.info
ACCEPT-ENCODING: gzip, br, zstd, deflate
ACCEPT: */*
CONNECTION: close[localisation] LocalisationCache: using store LCStoreDB[session] SessionManager using store SqlBagOStuff[DBReplication] Cannot use ChronologyProtector with EmptyBagOStuff[DBReplication] Wikimedia\Rdbms\LBFactory::getChronologyProtector: request info {
"IPAddress": "216.73.216.112",
"UserAgent": "Mozilla\/5.0 AppleWebKit\/537.36 (KHTML, like Gecko; compatible; ClaudeBot\/1.0; +claudebot@anthropic.com)",
"ChronologyProtection": false,
"ChronologyPositionIndex": 0,
"ChronologyClientId": false
}[DBConnection] Wikimedia\Rdbms\LoadBalancer::lazyLoadReplicationPositions: executed chronology callback.[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: connected to database 0 at 'localhost'.[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff[session] SessionBackend "5v2bpnrfsq0m2s1usdateegr1qtqe48t" is unsaved, marking dirty in constructor[session] SessionBackend "5v2bpnrfsq0m2s1usdateegr1qtqe48t" save: dataDirty=1 metaDirty=1 forcePersist=0[cookie] already deleted setcookie: "wikidb229_mw__session", "", "1725706563", "/", "", "", "1"[cookie] already deleted setcookie: "wikidb229_mw_UserID", "", "1725706563", "/", "", "", "1"[cookie] already deleted setcookie: "wikidb229_mw_Token", "", "1725706563", "/", "", "", "1"[cookie] already deleted setcookie: "forceHTTPS", "", "1725706563", "/", "", "", "1"[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: connected to database 0 at 'localhost'.[localisation] LocalisationCache::isExpired(en): cache for en expired due to GlobalDependency[localisation] LocalisationCache::recache: got localisation for en from source[DBQuery] startAtomic: entering level 0 (LCStoreDB::finishWrite)[DBQuery] endAtomic: leaving level 0 (LCStoreDB::finishWrite)Title::getRestrictionTypes: applicable restrictions to [[Template:Endflatlist]] are {edit,move}[objectcache] Rejected set() for global:revision-row-1.29:wikidb229-mw_:189:504 due to pending writes.[objectcache] Rejected set() for global:NameTableSqlStore:slot_roles:wikidb229-mw_ due to pending writes.[objectcache] Rejected set() for global:NameTableSqlStore:content_models:wikidb229-mw_ due to pending writes.[ContentHandler] Created handler for wikitext: WikitextContentHandler[MessageCache] MessageCache using store SqlBagOStuff[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff[SQLBagOStuff] SqlBagOStuff::lock failed due to timeout for wikidb229-mw_:messages:en.[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff[MessageCache] MessageCache::load: Loading en... local cache is empty, global cache is expired/volatile, loading from databaseParserFactory: using preprocessor: Preprocessor_HashUnstubbing $wgLang on call of $wgLang::_unstub from ParserOptions->__construct[caches] parser: SqlBagOStuffArticle::view using parser cache: yes[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuffParser cache options found.[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuffParserOutput cache found.Article::view: showing parser cache contentsMediaWiki::preOutputCommit: primary transaction round committedMediaWiki::preOutputCommit: pre-send deferred updates completedMediaWiki::preOutputCommit: session changes committedMediaWiki::preOutputCommit: LBFactory shutdown completedTitle::getRestrictionTypes: applicable restrictions to [[Template:Endflatlist]] are {edit,move}