Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Community portal
Recent changes
Random page
Help
Special pages
Donate
Islamd Wiki
Search
Search
English
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Template:Flatlist/doc
Template
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
View history
General
What links here
Related changes
Page information
In other projects
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
<noinclude>{{Protection padlock|small=yes}}</noinclude> {{Redirect|Template:Inline list|a navbox listing templates used within lines of text to mark problems needing attention|Template:Inline cleanup tags}} {{Documentation subpage}}<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata. Thank you! --> {{Used in system|in [[MediaWiki:Pageinfo-header]]}} {{Cascade-protected template}} {{Uses TemplateStyles|Template:Hlist/styles.css}} {{Template redirect|Flt|Startflatlist}} This template provides a [[Web Content Accessibility Guidelines|WCAG]]/ISO standards-compliant accessible alternative to comma-, dash- or other single character-delimited lists, per [[Wikipedia:Manual of Style/Lists#Horizontal lists|Manual of Style/Lists § Horizontal lists]] and [[Wikipedia:Manual of Style/Accessibility#Horizontal lists|Manual of Style:Accessibility § Horizontal lists]]. Lists output by {{Template link general|Flatlist}} and {{Template link general|Hlist}} are semantically and visually identical, differing only in the underlying wiki-markup they expect as input to create the lists. {{TOC limit|3}} == Usage == {{Template link general|Flatlist}} starts a horizontal list, such as: {{Flatlist| * [[cat]] * [[dog]] * [[horse]] * [[cow]] * [[sheep]] * [[pig]] }} If this template is used with no parameters, {{Template link general|Endflatlist}} is required. For navigation boxes using {{Template link general|Navbox}}, one can set {{Para|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 {{Template link general|Hlist}} instead. == Parameters == {{#switch:{{NAMESPACE}}:{{ROOTPAGENAME}} | #default = {{Format TemplateData|1=<templatedata>{ "description": { "en": "Used to create horizontal bulleted lists." }, "format": "block", "paramOrder": [ "class", "style", "indent", "1" ], "params": { "1": { "label": { "en": "Content" }, "description": { "en": "The list to wrap." }, "suggested": true, "type": "content" }, "class": { "label": { "en": "Extra Classes" }, "description": { "en": "Adds extra CSS classes to the containing div." }, "type": "string" }, "style": { "label": { "en": "CSS Style" }, "description": { "en": "Adds extra CSS properties to the containing div. Complex styles should not be used in articles (per [[MOS:DEVIATIONS]]) but may be acceptable on user, project and talk pages." }, "example": "\n border: solid 1px silver;\n background: lightyellow;\n color: black;\n", "type": "string" }, "indent": { "label": { "en": "Indent" }, "description": { "en": "Indents the list by a number of standard indents (one indent being 1.6[[em (typography)|em]]). (Useful in an indented discussion thread.)" }, "example": "2", "type": "number" } } }</templatedata>}} | Template:Endflatlist = {{Format TemplateData|1=<templatedata>{ "description": "Ends a flat list created by {{[[Template:Flatlist|Flatlist]]}}.", "format": "inline", "params": {} }</templatedata>}} }} == Examples == <syntaxhighlight lang="wikitext">{{Flatlist| * [[cat]] * [[dog]] * [[horse]] * [[cow]] * [[sheep]] * [[pig]] }}</syntaxhighlight> …produces: {{Flatlist| * [[cat]] * [[dog]] * [[horse]] * [[cow]] * [[sheep]] * [[pig]] }} === Alternative syntax === <syntaxhighlight lang="wikitext">{{Startflatlist}} * [[cat]] * [[dog]] * [[horse]] * [[cow]] * [[sheep]] * [[pig]] {{Endflatlist}}</syntaxhighlight> …produces: {{Startflatlist}} * [[cat]] * [[dog]] * [[horse]] * [[cow]] * [[sheep]] * [[pig]] {{Endflatlist}} === Syntax for ordered lists === <syntaxhighlight lang="wikitext">{{Flatlist| # [[first]] # [[second]] # [[3|third]] # [[fourth]] # [[fifth]] # [[sixth]] }}</syntaxhighlight> …produces: {{Flatlist| # [[first]] # [[second]] # [[3|third]] # [[fourth]] # [[fifth]] # [[sixth]] }} === Using optional parameters === <syntaxhighlight lang="wikitext">{{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]] }}</syntaxhighlight> …produces: {{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]] }} == Technical details == This template uses the {{Code|.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 [[interpunct]]s between list items and parentheses around nested lists. {| class="wikitable" ! Wikitext ! Expanded template ! HTML |- style="vertical-align: top;" | <syntaxhighlight lang="wikitext">{{Flatlist| * cat * dog * horse * cow * sheep * pig }}</syntaxhighlight> | {{nowiki2|tag=pre|{{Flatlist| * cat * dog * horse * cow * sheep * pig }}}} | <syntaxhighlight lang="html"><div class="hlist"><ul> <li>cat</li> <li>dog</li> <li>horse</li> <li>cow</li> <li>sheep</li> <li>pig</li> </ul></div></syntaxhighlight> |} == Maintenance categories == * {{Category link with count|Pages using flatlist with unknown parameters}} == See also == * {{Template link general|Endflatlist}} * {{Template link general|Hlist}} * {{Template link general|Plainlist}} and {{Template link general|Unbulleted list}} * {{Template link general|Bulleted list}} * {{Template link general|Ordered list}} * {{Template link general|Nowrap}} * {{Template link general|Pagelist}} * [[Wikipedia:Manual of Style/Accessibility#Horizontal lists|Manual of Style:Accessibility § Horizontal lists]] {{HTML lists}} <includeonly>{{Sandbox other||<!-- Categories below this line; interwikis at Wikidata --> [[Category:List formatting and function templates|Flatlist]] [[Category:Typing-aid templates|Flatlist]] }}</includeonly>
Summary:
By saving changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages included on this page:
Template:Bulleted list
(
edit
)
Template:Cascade-protected template
(
edit
)
Template:Category link
(
edit
)
Template:Category link/core
(
edit
)
Template:Category link with count
(
edit
)
Template:Cl
(
edit
)
Template:Code
(
edit
)
Template:Columns-list
(
edit
)
Template:Cslist
(
edit
)
Template:Cslist/styles.css
(
edit
)
Template:Defn
(
edit
)
Template:Div col
(
edit
)
Template:Div col/styles.css
(
edit
)
Template:Documentation subpage
(
edit
)
Template:Endflatlist
(
edit
)
Template:Flatlist
(
edit
)
Template:Flowlist
(
edit
)
Template:Flowlist/styles.css
(
edit
)
Template:Format TemplateData
(
edit
)
Template:Glossary
(
edit
)
Template:Glossary/styles.css
(
edit
)
Template:Glossary end
(
edit
)
Template:HTML lists
(
edit
)
Template:Hlist
(
edit
)
Template:Hlist/styles.css
(
edit
)
Template:Main other
(
edit
)
Template:Mbox
(
edit
)
Template:Navbox bottom
(
edit
)
Template:Navbox top
(
edit
)
Template:No redirect
(
edit
)
Template:Nowiki2
(
edit
)
Template:Ordered list
(
edit
)
Template:Para
(
edit
)
Template:Plainlist
(
edit
)
Template:Plainlist/styles.css
(
edit
)
Template:Protection padlock
(
edit
)
Template:Redirect
(
edit
)
Template:Sandbox other
(
edit
)
Template:Section link
(
edit
)
Template:Startflatlist
(
edit
)
Template:Strong
(
edit
)
Template:TOC limit
(
edit
)
Template:TOC limit/styles.css
(
edit
)
Template:TemplateData header
(
edit
)
Template:Template link expanded
(
edit
)
Template:Template link general
(
edit
)
Template:Template link null
(
edit
)
Template:Template other
(
edit
)
Template:Template parameter usage
(
edit
)
Template:Template redirect
(
edit
)
Template:Term
(
edit
)
Template:Terminate sentence
(
edit
)
Template:Tlx
(
edit
)
Template:Tnull
(
edit
)
Template:Unbulleted list
(
edit
)
Template:Used in system
(
edit
)
Template:Uses TemplateStyles
(
edit
)
Template:Yesno
(
edit
)
Template:Yesno-no
(
edit
)
Template:Yesno-yes
(
edit
)
Module:Arguments
(
edit
)
Module:Check for unknown parameters
(
edit
)
Module:Cslist
(
edit
)
Module:Delink
(
edit
)
Module:Effective protection expiry
(
edit
)
Module:Effective protection level
(
edit
)
Module:File link
(
edit
)
Module:Format TemplateData
(
edit
)
Module:Format TemplateData/config
(
edit
)
Module:Format link
(
edit
)
Module:Hatnote
(
edit
)
Module:Hatnote/styles.css
(
edit
)
Module:Hatnote list
(
edit
)
Module:High-use
(
edit
)
Module:JSONutil
(
edit
)
Module:List
(
edit
)
Module:Lua call
(
edit
)
Module:Message box
(
edit
)
Module:Message box/configuration
(
edit
)
Module:Message box/ombox.css
(
edit
)
Module:Multilingual
(
edit
)
Module:Navbar
(
edit
)
Module:Navbar/configuration
(
edit
)
Module:Navbar/styles.css
(
edit
)
Module:Navbox
(
edit
)
Module:Navbox/configuration
(
edit
)
Module:Navbox/styles.css
(
edit
)
Module:Navbox top and bottom
(
edit
)
Module:Protection banner
(
edit
)
Module:Protection banner/config
(
edit
)
Module:Redirect
(
edit
)
Module:Redirect hatnote
(
edit
)
Module:Section link
(
edit
)
Module:Shortcut
(
edit
)
Module:Shortcut/config
(
edit
)
Module:Shortcut/styles.css
(
edit
)
Module:String
(
edit
)
Module:TNT
(
edit
)
Module:TableTools
(
edit
)
Module:Template link general
(
edit
)
Module:Template wrapper
(
edit
)
Module:Transclusion count
(
edit
)
Module:Transclusion count/data/F
(
edit
)
Module:Uses TemplateStyles
(
edit
)
Module:Uses TemplateStyles/config
(
edit
)
Module:WLink
(
edit
)
Module:Yesno
(
edit
)
Search
Search
Editing
Template:Flatlist/doc
Add languages
Add topic