Permanently protected template

Template:Horizontal TOC

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search


Template documentation[view] [edit] [history] [purge]

This template lays out the table of contents in a horizontal list rather than a vertical one.


{{horizontal TOC}}

There is no need to specify __NOTOC__: this template handles that automatically.

  • See example

To hide the generated heading numbers, use:

{{horizontal TOC|nonum=yes}}
  • See example

To limit the depth of the generated headings to the first headings only, use:

{{horizontal TOC|limit=2}}
  • See example

To float the table of contents to the center of the page, use:

{{horizontal TOC|align=center}}
  • See example

For country and state lists with flag icons, see these examples: Legality of cannabis by country. And: Legality of cannabis by U.S. jurisdiction.

For example,

{{horizontal TOC}}


See also

This template lays out the table of contents in a horizontal list rather than a vertical one.

Template parameters

This template prefers inline formatting of parameters.

Parameter Description Type Status
No numbers nonum

Hide the generated heading numbers

String optional
Limit limit

Limits the depth of subheadings shown. For instance using limit=4 will hide the fourth level and deeper subheadings in the hierarchy. And limit=2 will hide all subheadings leaving only the main headings. This works by hiding the lower levels with CSS

Number optional
Align align

Which side of the page to align the ToC to. Allowed values are left, right, center

String optional
Clear clear

Align underneath floating images and tables or not. Allowed values are left, right, both, none

String optional
Retrieved from ""
This content was retrieved from Wikipedia :
This page is based on the copyrighted Wikipedia article "Template:Horizontal TOC"; it is used under the Creative Commons Attribution-ShareAlike 3.0 Unported License (CC-BY-SA). You may redistribute it, verbatim or modified, providing that you comply with the terms of the CC-BY-SA