• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:Endflatlist

  • Template
  • Talk
  • Language
  • Watch
  • View source
Template documentation[view] [edit] [history] [purge]
"Template:Inline list" redirects here. For a navbox listing templates used within lines of text to mark problems needing attention, see Template:Inline cleanup tags.
WarningThis template is used in MediaWiki:Pageinfo-header, and on approximately 286,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.
Redirects
  • {{startflatlistTemplate:Startflatlist}}
  • {{fltTemplate:Flt}}
CSSThis template uses TemplateStyles:
  • Template:Hlist/styles.css

This template provides a WCAG/ISO-standards-compliant accessible alternative to comma- or dash- (or other single character-) separated lists, per WP:FLATLIST and MOS:HLIST.

Lists output by {{Flatlist}} and {{Hlist}} are semantically and visually identical, and differ only in the wiki-markup used to create the lists.

Contents

  • 1 Usage
  • 2 Parameters
  • 3 Examples
    • 3.1 Alternative syntax
    • 3.2 Syntax for ordered lists
    • 3.3 Using optional parameters
  • 4 Technical details
  • 5 Maintenance categories
  • 6 See also

Usage

{{flatlist}} starts a horizontal list, such as:

  • cat
  • dog
  • horse
  • cow
  • sheep
  • pig

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. asterisk) markup does not work, so consider using {{hlist}} instead.

Parameters

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Endflatlist in articles based on its TemplateData.

TemplateData for Endflatlist

fatal JSON error: mw.text.jsonDecode: Syntax error
{
	"description": "Ends a flat list created by <span class="nowrap">&#123;&#123;</span>flatlist<span class="nowrap">&#125;&#125;</span>.",
	"format": "inline",
	"params": {
	}
}

Examples

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

produces:

  • cat
  • dog
  • horse
  • cow
  • sheep
  • pig

Alternative syntax

{{startflatlist}}
* [[cat]]
* [[dog]]
* [[horse]]
* [[cow]]
* [[sheep]]
* [[pig]]
{{endflatlist}}

produces:

  • cat
  • dog
  • horse
  • cow
  • sheep
  • pig

Syntax for ordered lists

{{flatlist|
# [[first]]
# [[second]]
# [[3|third]]
# [[fourth]]
# [[fifth]]
# [[sixth]]
}}

produces:

  1. first
  2. second
  3. third
  4. fourth
  5. fifth
  6. sixth

Using optional parameters

{{flatlist |indent=2 
|style=border:solid 1px silver; background:lightyellow; 
|class=nowraplinks |
* [[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:

  • 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 .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 they would normally display 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-0000001E-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

  • Category:Pages using flatlist with unknown parameters (11)

See also

  • {{endflatlist}}
  • {{hlist}}
  • {{plainlist}} and {{unbulleted list}}
  • {{bulleted list}}
  • {{ordered list}}
  • {{nowrap}}
  • {{pagelist}}
  • WP:HLIST
  • v
  • t
  • e
HTML lists
More information —
  • Help:List
  • WP:List dos and don'ts
  • WP:Manual of Style/Embedded lists
  • WP:Manual of Style/Accessibility § Lists
  • WP:WikiProject Lists
Horizontal list
{{hlist|item1 |item2 }}
  • item1
  • item2
Horizontal list
{{flatlist|
* item1
* item2}}
  • item1
  • item2
Horizontal list
{{cslist|item1 |item2 }}
  • item1
  • item2
Bulleted list
{{bulleted list|item1 |item2 }}
  • item1
  • item2
Numeric ordered list
{{Ordered list|first |second }}
  1. first
  2. second
Alphabetic ordered list
{{Ordered list|list_style_type=lower-alpha |first |second }}
  1. first
  2. second
Unbulleted list
{{unbulleted list|item1 |item2 }}
  • item1
  • item2
Unbulleted list
{{plainlist|
* item1
* item2}}
  • item1
  • item2
Glossary or definition list
{{glossary}}

{{term|first term}}{{defn|first description}}
{{term|second term}}{{defn|second description}}
{{glossary end}}

first term
first description
second term
second description
Bulleted list to flow around an image
[[File:Bad Title Example.png|left|thumb|100px]]

{{flowlist|
*item1
*item2}}

  • item1
  • item2
Ordered list in columns
{{columns-list|colwidth=5em|
# first
# second}}
  1. first
  2. second
Category:List formatting and function templates
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.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Endflatlist&oldid=1208352830"
Last edited on 17 February 2024, at 05:16

Languages

    • Afrikaans
    • अंगिका
    • Аԥсшәа
    • العربية
    • অসমীয়া
    • Авар
    • تۆرکجه
    • Basa Bali
    • বাংলা
    • 閩南語 / Bân-lâm-gí
    • Беларуская (тарашкевіца)
    • भोजपुरी
    • Bosanski
    • Буряад
    • Dansk
    • الدارجة
    • डोटेली
    • Eesti
    • Ελληνικά
    • فارسی
    • Føroyskt
    • Gaeilge
    • 한국어
    • Hawaiʻi
    • Հայերեն
    • Ilokano
    • Bahasa Indonesia
    • Íslenska
    • Jawa
    • ქართული
    • Қазақша
    • Ladin
    • Latviešu
    • मैथिली
    • Македонски
    • مصرى
    • ဘာသာမန်
    • مازِرونی
    • 閩東語 / Mìng-dĕ̤ng-ngṳ̄
    • Монгол
    • မြန်မာဘာသာ
    • नेपाली
    • 日本語
    • Norsk bokmål
    • ଓଡ଼ିଆ
    • Oʻzbekcha / ўзбекча
    • ਪੰਜਾਬੀ
    • ပအိုဝ်ႏဘာႏသာႏ
    • پښتو
    • ភាសាខ្មែរ
    • Português
    • Qaraqalpaqsha
    • Română
    • Русиньскый
    • Русский
    • संस्कृतम्
    • سرائیکی
    • Scots
    • Shqip
    • සිංහල
    • Simple English
    • کوردی
    • Српски / srpski
    • Srpskohrvatski / српскохрватски
    • தமிழ்
    • တႆး
    • ไทย
    • Türkçe
    • Українська
    • اردو
    • Tiếng Việt
    • 吴语
    • 粵語
    • Zazaki
    • 中文
    • Kadazandusun
    Wikipedia
    • Wikimedia Foundation
    • Powered by MediaWiki
    • This page was last edited on 17 February 2024, at 05:16 (UTC).
    • Content is available under CC BY-SA 4.0 unless otherwise noted.
    • Privacy policy
    • About Wikipedia
    • Disclaimers
    • Contact Wikipedia
    • Code of Conduct
    • Developers
    • Statistics
    • Cookie statement
    • Terms of Use
    • Desktop