Wikipedia:Contents box

From Wikipedia, the free encyclopedia

A contents box on a wikipedia page is an automatic table of contents for the article it is located on. It is located just below an article's introduction. It is generated from the section header markup. Each section title is listed on a new line within the contents box. The contents box prefixes each section title with numbers representing the tree structure of the sections and their subsections within the document. Section titles within the contents box are prefixed with additional space for each additional sublevel they belong to. This forms a common tree view listing. The contents box only appears when there are four or more level two headers.

The entries are anchored to the sections; mouse clicking one will make the browser jump down the article page to that section.

Content boxes have a "show" or "hide" text, which collapses or expands the box when the reader clicks the on it. The box does not dissapear completely when hidden, the words "contents" and "show" remain visible. The user's hide-show state persists across article page views.

Larger articles with many sections cause content boxes to be quite tall on the page, yet most content boxes remain narrow as section titles tend to be short. As of 22 April 2007, the first section will not flow to the right of the contents box. This can cause a large area of wasted white space to the right of the contents box, as the text of the first section begins only at the end of the contents box.

Some Wikipedians feel the contents box should be moved out of the article pages and into the wikipedia interface. It could become part of "navigation" on the left, or possibly a horizontal bar or tabs along the top.