Wikipedia:Section
From Freepedia
- (For general information about sections in the MediaWiki software, see m:Help:Section. This page is for aspects which are specific for Wikipedia.)
Preferably, articles are divided into sections, using the section header syntax; this is often but not always better than just using bolded text for headers, see below.
Contents |
Creation of sections
Sections are created by creating their headers as follows (see also Wikipedia:How to edit a page):
== Section == === Subsection === ==== Sub-subsection ====
Table of contents (TOC)
For each article with more than three headings, a table of contents (TOC) is automatically generated from the section headings, unless:
- (for a user) preferences are set to turn it off
- (for an article) in the edit box the code __NOTOC__ is added
The TOC is put before the first section header unless it is placed manually with the code __TOC__. Thus there may be some introductory text before it, known as the "lead". See Wikipedia:Guide to writing better articles#Lead section for recommendations on the length of that section.
Preferences can be set to number the sections automatically.
Compact TOC
Where you have a large number of very short headings (such as letters of the alphabet) you can get a very long table of contents. An alternative is a compact table of contents, which you can achieve by inserting the following text:
{{compactTOC}}
which looks like this:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
You can do similar things with years or decades, for example:
1900s - 1910s - 1920s - 1930s - 1940s - 1950s - 1960s - 1970s - 1980s - 1990s - 2000s
Both of the above make use of section linking (see below). Several different compact TOCs can be found at Wikipedia:Template messages/Compact table of contents.
Non-automatic TOC
If the automatic TOC is not suitable, one can specify __NOTOC__ and make one manually. For an example see [1]; it is applied for that page because the page contains examples of headers, which the automatic TOC would take as actual section headers. Later versions of the page removed the need for the manual TOC.
Turning off the TOC numbers
Currently you cannot turn off the numbering of sections in the TOC.
Floating the TOC
The TOC can, in some instances, be floated either right or left using {{TOCright}} or {{TOCleft}}. Before changing the default TOC to a floated TOC, consider the following guidelines:
- A floating TOC should be used when it is beneficial to the layout of the article, or when the default TOC gets in the way of other elements.
- If an article will be adversely affected by the change, don't float the TOC.
- When floating a TOC, check whether the page layout will be harmed if the TOC is hidden by the user.
- The TOC should not be longer than necessary, whether it is floated or not.
- The default TOC is placed before the first headline, but after any introductory text (unless changed by the page's editors). If the introductory summary is long enough that a typical user has to scroll down to see the top of the TOC, you may float the TOC so it appears closer to the top of the article. However, the floating TOC should in most cases follow at least the first paragraph of article text.
- Floating a wide TOC will produce a narrow column of readable text for users with low resolutions. If the TOC's width exceeds 30% of the user's visible screen (about twice the size of the Wikipedia navigation bar to the left), then it is not suitable for floating. (Percentages assume a typical user setup.) If text is trapped between a floating TOC and an image, floating can be cancelled at a certain text point, see Forcing a break.
- If the TOC is placed in the general vicinity of other floated images or boxes, it can be floated as long as the flowing text column does not become narrower than 30% of the average user's visible screen width.
- If the TOC is going to be placed in a long list page, it should be floated.
- A left-floated TOC may affect bulleted or numbered lists. Where it does, float the TOC to the right, or do not float it.
The {{TOCright}} template was proposed for deletion in early July 2005, but there was no consensus on the matter. The archive of the discussion and voting regarding this may be seen at Wikipedia:Templates for deletion/TOCright. The Manual of Style discussion can be found here.
Section linking
You can use section linking to link to a section within the same page (using [[#section name|displayed text]], and if another section with the same name exists a _(sequential number) is appended as in [[#section name_2|displayed text]]), or to a section within another page (using [[page name#section name|displayed text]]).
Section linking does not work in a redirect. One can use it anyway in a redirect as a clarification, and at least it works when clicking on the link from the redirect page.
Editing of individual sections
Sections can be separately edited ("section editing feature") by right clicking on the section header (in the case of text before the first section header: on the article header), or on special edit links, depending on the preferences set. This is convenient if the edit is not related to the content in other sections. Inserting a section can be done by editing either the section before or after it, merging with the previous section by deleting the header. Using section edit links can reduce edit conflicts on frequently edited pages.
See also section title as automatic edit summary.
Horizontal dividing line
A horizontal dividing line has a conventional use, as a demarcation of division to isolate sections that logically could stand on their own as main sections with a disambiguating category in parentheses: Orion (mythology) and Orion (constellation). Horizontal dividing lines set apart the distinct meanings of a term.
When such sections contain only a few sentences in a single paragraph, this is a good way for readers to find your information. But if your article on a secondary meaning contains more than one paragraph, it may become confusing to the eye.
Note that these lines are not taken into account in the section numbering and TOC. As a result, the explanation of the second meaning of the word is treated as part of the previous section of the text written for the first meaning. To avoid this, use appropriate headers in addition to dividing lines.
In Wikipedia markup, a horizontal line is defined by a line of four dashes ('----').
See also: Wikipedia:Disambiguation
"See also" line or section
If an article consists of sections and a "see also" refers to the whole article, then make it a separate section. This is to avoid it becoming part of the prior section, to make it visible in the TOC, and to make it easily accessible through the TOC.
Alternatively, a "see also" line is sometimes put at the beginning, to link to an article about another meaning of the word, or in the case of a link that many readers are likely to follow instead of reading the article. Do not make this initial "see also" a section. In such cases, the see also should be italicized and indented. A horizontal line should not be placed under this "see also". (see Wikipedia:Hatnotes)
A "see also" belonging to just one section can be put in that section: within a paragraph, as a separate paragraph, or as a subsection.
See also
- Wikipedia:Manual of Style (headings)
- Wikipedia:User preferences help
- Wikipedia:Guide to writing better articles#Headings
- Wikipedia:Talk page guidelines- (how to use headings on talk pages)



