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

Template:Cslist/sandbox

  • Template
  • Talk
  • Language
  • Watch
  • Edit
< Template:Cslist
This is the template sandbox page for Template:Cslist (diff).
See also the companion subpage for test cases.
Template documentation[view] [edit] [history] [purge]
CSSThis template uses TemplateStyles:
  • Template:Cslist/styles.css (sandbox)
This template uses Lua:
  • Module:Cslist (sandbox)
Shortcut
  • {{cslTemplate:Csl}}

The "cslist" (comma-separated list) template allows editors to create a horizontal list similar to Template:Hlist, but using comma separators instead of mid-dots.

  • The template has an optional |semi=, which when set will use a semicolon as separator instead of a comma.
  • The template has an optional |oxford=, which when set will generate a list that says and before the last item.

It calls Module:Cslist to process an arbitrary number of list items and generate the list.

The unordered list which is generated is good for accessibility, and is intended as an alternative to {{hlist}}. For use in article prose instead of tables and infoboxes, use the |oxford= parameter.

Examples

edit
  • {{cslist|first item|second item|third item|etc}}
  • first item
  • second item
  • third item
  • etc
  • {{cslist|first item|second item|third item|etc|semi=true}}
  • first item
  • second item
  • third item
  • etc
  • {{cslist|first item|second item|third item|oxford=true}}
  • first item
  • second item
  • third item
  • {{cslist|first item|second item|oxford=true}}
  • first item
  • second item

See also

edit
  • Template:Enum
  • 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:Cslist/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Cslist/sandbox&oldid=1280442368"
Last edited on 14 March 2025, at 17:17

Languages

      This page is not available in other languages.

      Wikipedia
      • Wikimedia Foundation
      • Powered by MediaWiki
      • This page was last edited on 14 March 2025, at 17:17 (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