Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Template:Flatlist

Permanently protected template
From Wikipedia, the free encyclopedia
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, seeTemplate:Inline cleanup tags.
WarningThis template is used inMediaWiki:Pageinfo-header, and onapproximately 2,520,000 pages, or roughly 4% of all 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 ownuser subpage. The tested changes can be added to this page in a single edit. Please discuss changes on thetalk page before implementing them.
This template can only be edited byadministrators because it istranscluded onto one or morecascade-protected pages.
CSSThis template usesTemplateStyles:

This template provides aWCAG/ISO-standards-compliant accessible alternative to comma- or dash- (or other single character-) separated lists, perWP:FLATLIST andMOS:HLIST.

Lists output by{{Flatlist}} and{{Hlist}} are semantically and visually identical, and differ only in the wiki-markup used 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. asterisk) markup does not work, so consider using{{hlist}} instead.

Parameters

This is theTemplateData for this template used byTemplateWizard,VisualEditor and other tools.See a monthly parameter usage report forTemplate:Flatlist in articles based on its TemplateData.

TemplateData for Flatlist

Used to create horizontal bulleted lists.
    ParameterDescriptionTypeStatus
    Content1
    The list to wrap.
      Contentsuggested
      Extra Classesclass
      Adds extra CSS classes to the containing div.
        Stringoptional
        CSS Stylestyle
        Adds extra CSS properties to the containing div. Complex styles should not be used in articles (perMOS:DEVIATIONS) but may be acceptable on user, project and talk pages.
          Example
          border: solid 1px silver;
          background: lightyellow;
          color: black;
          Stringoptional
          Indentindent
          Indents the list by a number of standard indents (one indent being 1.6em). (Useful in an indented discussion thread.)
            Example
            2
            Numberoptional

            Format:inline

            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|style=border:solid 1px silver; background:lightyellow; color:black;|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:

            Technical details

            This template uses the.hlistCSS class defined inTemplate: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 theinterpuncts between list items and parentheses around nested lists.

            WikitextExpanded templateHTML
            {{flatlist|* cat* dog* horse* cow* sheep* pig}}
            '"`UNIQ--templatestyles-00000027-QINU`"'<div class="hlist " >* cat* dog* horse* cow* sheep* pig
            </div>
            
            <divclass="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

            HTML 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
            The abovedocumentation istranscluded fromTemplate:Flatlist/doc.(edit |history)
            Editors can experiment in this template'ssandbox(edit |diff) andtestcases(edit) pages.
            Add categories to the/doc subpage.Subpages of this template.
            Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Flatlist&oldid=1293848367"
            Categories:
            Hidden categories:

            [8]ページ先頭

            ©2009-2025 Movatter.jp