Jump to content

Template:Flatlist/doc

Перевод выполнен человеком
Revision as of 18:47, 14 February 2026 by imported>RogueScholar (Fix TemplateData)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Lua error in Module:Effective_protection_level at line 64: attempt to index field 'TitleBlacklist' (a nil value).

Lua error in Module:Effective_protection_level at line 64: attempt to index field 'TitleBlacklist' (a nil value).

Lua error in Module:TNT at line 159: Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/Uses TemplateStyles.tab.

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.

{{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

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

TemplateData for Flatlist

Used to create horizontal bulleted lists.
Content1
The list to wrap.
Extra Classesclass
Adds extra CSS classes to the containing div.
CSS Stylestyle
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.
⧼templatedata-doc-param-example⧽
border: solid 1px silver;

background: lightyellow;

color: black;
Indentindent
Indents the list by a number of standard indents (one indent being 1.6em). (Useful in an indented discussion thread.)
⧼templatedata-doc-param-example⧽
2

Examples

[edit source]

<syntaxhighlight lang="wikitext">

</syntaxhighlight>

…produces:

Alternative syntax

[edit source]

<syntaxhighlight lang="wikitext">

</syntaxhighlight>

…produces:

Syntax for ordered lists

[edit source]

<syntaxhighlight lang="wikitext">

</syntaxhighlight>

…produces:

Using optional parameters

[edit source]

<syntaxhighlight lang="wikitext">

</syntaxhighlight>

…produces:

Technical details

[edit source]

This template uses the <syntaxhighlight lang="text" class="" style="" inline="1">.hlist</syntaxhighlight> 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
<syntaxhighlight lang="wikitext">
  • cat
  • dog
  • horse
  • cow
  • sheep
  • pig
</syntaxhighlight>
'"`UNIQ--templatestyles-0000001E-QINU`"'<div class="hlist " >
* cat
* dog
* horse
* cow
* sheep
* pig

</div>
<syntaxhighlight lang="html">
  • cat
  • dog
  • horse
  • cow
  • sheep
  • pig
</syntaxhighlight>

Maintenance categories

[edit source]

See also

[edit source]