Help:Wikipedia: The Missing Manual/Formatting and illustrating articles/Article sections and tables of contents

Wikipedia has two features to make readers' lives easier—sections and tables of contents. Without these, most Wikipedia articles would be a mass of text, unbroken except for images and infoboxes. Getting a quick overview could cause eyestrain as well as mouse cramp.

A well-done table of contents is a godsend. It appears high on the page, giving readers a quick overview of the article, as well as a quick route to an interesting part of the article. Best of all, Wikipedia's software generates the table of contents automatically from the section headings (see the section about your first edit). If you get those right, then the TOC is going to be in good shape.

This chapter starts out showing you how to effectively use sections in an article. From there, you can tweak the automatic table of contents to make it even better.

Getting sections right
Much like magazine and newspaper feature articles, Wikipedia articles have three different kinds of sections.


 * Lead. The lead section introduces the article's topic. Like the introductory paragraph of a newspaper article or a term paper, it tells readers exactly what they'll learn in the rest of the article.
 * Body sections. Even relatively short articles are easier to read when the main body is broken up into sections, one for each subtopic. Sections are so important that you learned to create them in Chapter 1: Editing for the first time (see the section about your first edit).
 * Bottom. Since Wikipedia articles should always be based on research from reliable sources, most articles have sections for footnotes, external links, and so on. These items always come at the bottom.

Lead section
The lead section is always the first section in the article (which is why you may hear it called the top section). To help editors write strong leads, Wikipedia provides a guideline at Manual of Style/Lead section (shortcut: MOS:LEAD). Unlike a tabloid magazine article lead, a Wikipedia article lead doesn't tease or tantalize the reader into reading further. Instead, it provides a brief summary of what the article covers, and, equally important, why the article's subject is important or notable.

The following four points can save you from committing the Lead section guideline to memory:


 * When an article is very short, a lead section isn't necessary. The body of the article is one section and starts with an introductory sentence or introductory short paragraph.
 * If an article's in poor condition, focus most of your efforts on fixing the body (Chapter 18: Better articles: A systematic approach), and then, if you have time, do a thorough rewrite of the lead section. (You don't have to do it all in one session, and other editors will probably pitch in.)
 * If the article's long enough to have several sections in the body, but still less than roughly 32,000 characters in length, aim for a lead section of about two paragraphs. For very long articles, the lead should be no more than four paragraphs, and the paragraphs should be no more than four or five sentences each.
 * A lead section generally doesn't contain citations. A lead is a summary, and supporting information comes in the body of the article. However, if the summary contains a controversial statement, a footnote in the lead improves its credibility. If the consensus of editors working on the article is that certain statements need citations, don't fight it, even if you disagree. An extra footnote isn't a big issue.


 * Footnotes are always required in lead sections for contentious information about living persons, regardless of the generality of the statement or the supporting information in the body of the article.

If you make sure this sequence is in place, as specified by the guideline Accessibility (shortcut: WP:ACCESS), you'll help make Wikipedia accessible to everyone.

Body of the article
Breaking the body text of an article into sections makes it easier for readers to scan and follow, and makes for a more useful table of contents. Sections with more than 12 or so paragraphs could benefit from subsections, which provide additional headings for readers. On the other hand, sometimes you end up with a section of just one or two paragraphs. That's okay if the subsection fits within the section, and the information can't logically fit into another subsection.

Here are some tips for paragraphs and subsections:


 * Aim to have few or no single-sentence paragraphs. At the other extreme, paragraphs beyond 1,000 characters (roughly 12 lines of typed text) are hard to read. In that case, there are probably multiple thoughts that would be better revealed if they were separated. In other words, make paragraphs short enough for readability, but long enough to develop an idea.
 * When creating subsections, your most important goal is to preserve the hierarchy of the article. For example, in an article about a movie, it makes sense to have a section called "Reception" (or perhaps "Reviews"), with subsections "Critical", "Commercial", and "Nominations and Awards". On the other hand, adding a "Sequels" subsection to "Reception" could be questioned. "Sequels" should probably be its own section, even if it's only a paragraph or two.
 * A chronological approach for subsections is also logical. For example, an article about a military battle might start with a section or two about events leading up to the battle; then a section about the battle itself, with subsections being the chronological phases of the battle; and finally one or more sections describing the immediate aftermath of the battle, and its longer-term consequences.

When an article gets too long
Even when you've gotten the sections exactly right, there may be too many of them—that is, the article may be too long. How long is "too long?" One hint is when Wikipedia starts telling you the size of the article, which will start happening at around 6,000 words. Next, at around 12,000 words, it starts advising you to consider splitting the article

Anything over 100K (roughly 20,000 words) almost always need to be split. This general rule has several exceptions: lists, articles summarizing certain fields, and controversial subjects where an article is heavily documented. That last group includes examples like the Patriot Act, at K. You can see more examples at Special:LongPages. (For more on lengthy articles, see the guideline Article size, shortcut: WP:SIZE.)

When there's an editorial consensus to shorten an exceptionally long article, you can do it in several ways. For example, you can split up long lists somewhat arbitrarily (for details, see the section about formatting lists). The standard solution when dealing with a long article, or even a too-long section, is to spin off part of that article—creating what Wikipedia calls a daughter article. The details are in the guideline Summary style (shortcut: WP:SS), but the concept is straightforward. Two things get left in the original article: a link to the new daughter article, and a summary of the contents of that daughter article.

Creating daughter articles is a matter of judgment. Don't start spinning off content as soon as an article exceeds 32K or 64K or even 100K. Instead, discuss the matter with other editors on the article talk page, to determine whether to treat the topic as a whole as several shorter articles or to just create daughter articles for one or two sections.

Thus, you can either leave a too-long article as is, split it into multiple articles, or spin off a daughter article. But there's a fourth alternative—you can remove content. You'll probably only do so as a last resort when an article violates WP:NOT by including too much detail. If you can't see a way to spin off that excess detail into its own article, advise other editors via the article talk page before you start chopping.

Creating a daughter article
Creating a daughter article isn't hard, but it requires a lot of steps. The following example uses the article Dallas Independent School District as a case study. In late 2007, this 170K behemoth was number 50 on the list of biggest articles in Wikipedia.

1. Scan the article to determine why it's so long.


 * In this case, it's obvious: Section 6: list of schools, is made up of a number of very long tables. That's perfect for a daughter article.

2. Decide on the name for the new daughter article.


 * Generally that's a variant of the title of the existing section. In this case, the title of the section is "List of schools". The daughter article will become List of schools of the Dallas Independent School District.

3. Open a second browser window (or tab) that shows any Wikipedia page.


 * You're opening a second window because you want to continue to have a window open to the article you're going to shorten. It doesn't matter what page, because you're going to be there only momentarily.

4. In the second window, in the search box, type the new title. Or type the name elsewhere, and then paste it into the search box. Click Go.


 * Presumably, the daughter article doesn't already exist. You see something like Figure 13-1.

5. Click "create this page".


 * That click puts you into edit mode at the new page, the one for the daughter article. The page for the new article is now ready to receive content from the parent article.

6. In the original article, click the "edit" link for the section you're moving. Select all the text in the section except for the heading. Right-click the selected text, and then, from the shortcut menu, choose Cut, or use the keyboard shortcut Ctrl+X (Windows) or ⌘-X (Mac).


 * If cutting all this text feels scary, don't worry—you can't really damage the article. Remember, as discussed in the section about page histories, that Wikipedia software keeps a copy of every version of the article. If anything goes wrong, you can always go to the history page and revert back to an undamaged version.

7. In the edit window of the new article, paste everything into the edit box. Add an edit summary, something like:  Creating daughter article from content of Article name, per WP:SS . Do a page preview, and then click "Publish page".


 * If you want to see what happens to the new article after you create it, turn on the "Watch this page" box below the edit summary before you publish the page.

8. Now back to the original article. In the section still open for editing, which now has only a heading, add a  template just below the heading, and a paragraph or two to summarize the daughter article.


 * In an ideal world, the daughter article's first paragraph is already a summary that you can use; if not, usually much of it is usable for a summary. Figure 13-2 shows what the section of the DISD article looks like (both the reader's version and the underlying wikitext) after a template and summary have been added.

9. Add an edit summary, something like:  Creating daughter article at Name of daughter article, per WP:SS .


 * As usual, do a page preview, check the "Watch this page" box below the edit summary, if you wish, and then click "Publish page".

10. Finally, go back and polish the daughter article, adding some things that were in the original article but are now missing or need editing.


 * You'll probably need to do most of the following:


 * Add or revise the lead section so it meets the criteria discussed earlier in this chapter (see the section about lead sections) and the specifications of WP:LEAD.
 * Change the section headings to fit the new article (that generally means removing one equal sign from each side of every heading).
 * Add one or more categories to the article (you'll want to use most, if not all of the categories on the parent article; you'll see the wikitext when you edit the final section of the parent article). (For more on categories, see Chapter 17: Categorizing articles.)
 * If the text you moved contained any footnotes (&lt;ref> tags), copy (don't move) the "References" section (sometimes called "Notes") from the original article.
 * Start a talk page for the daughter article (see the section about talk pages), and paste in any WikiProject templates from the talk page of the parent article. (If there are article assessments of quality or importance, change those to be blank. Assessments of the parent article aren't valid for the daughter article.)

Bottom
Certain optional sections always go at the bottom of an article. Although they're technically optional, all properly sourced articles have sections for footnotes and external links.

The sections that can appear at the bottom of an article, in the preferred order, are:


 * See also. A bulleted list of internal links and, optionally, a short explanation for any link whose purpose isn't obvious. Figure 13-3 is an example. (If the link is already in the article, don't add it to the "See also" section.)


 * References, Notes, Footnotes, or Notes and footnotes. Whatever you find, don't change any of these four section headings when you find them in an article (unless you're an experienced editor). But if the section is (incorrectly) called "Citations", change it to "References" or "Notes", whichever isn't already being used.


 * If you're adding footnotes for the first time to an article, set up a "References" section for that, as described in Chapter 2: Documenting your sources (see the section about adding footnotes).


 * Further reading or Bibliography. This section contains sources that weren't used in writing the article, but that provide material that could eventually be used. It's unusual to find this section, mostly because if a potential source is online, it should be listed under "External links", not in "Further reading". Figure 13-4 shows an example.


 * External links. Lists a small number of high-quality sites that most readers will find useful and that were generally not cited as sources. Figure 13-5 gives an example. Most experienced editors find links to prune from these sections. The external links section is where you're most likely to find linkspam. And even when links to blogs, personal Web pages, and so on are well-intentioned, they normally don't belong in an article. The guideline External links (shortcut: WP:EL) has details.

Getting headings right
As discussed in Chapter 1: Editing for the first time, headings are easy to create and format—just add the right number of equal signs on either side (see the section about your first edit). This section focuses on what to put between the equal signs.

Sometimes headings violate one of Wikipedia's rules. You may not get a warning on your user talk page if you make an error, but by following a few simple rules, you can create excellent headings every time.

Wording and capitalization
Many of the guidelines for headings are the same as for article titles, as discussed in the section about creating articles. The top seven rules are the most important (and the most common opportunities for error):


 * Capitalize only the first letter of the first word, letters in acronyms, and the first letter of proper nouns. All other letters are in lower case. Thus: "Funding of projects," not "Funding of Projects."
 * Don't restate the article title or a higher level heading. For example, the article Greta Garbo has a section called "Later career". "Her later career" or "Garbo's later career" would be wrong.
 * Keep headings short. You can sum up almost any subject in 10 words. Thus: "Housing boom in the early 1990s", not "Housing boom in the early 1990s lasts for only a few years". Long headings, as in this example, tend to reveal the storyline. The goal of a heading is to invite readers to read the section and find out what happened.


 * Long headings are also a problem when a different article links to that section heading. Not only is the link longer, but the likelihood of the heading being changed—damaging the link—is much higher because of the length.


 * Stick with nouns or noun phrases. "Effects of the wild" is a good heading. "About the effects of the wild" or "Effects of the wild can be serious" are not. (This principle ties back to the goal of shorter headings.)
 * Don't use "a", "an" or "the" as the first word in a section title (unless it's part of a proper noun). Thus, "Condition of the frescos," not "The condition of the frescos."
 * Don't use boldface or italic text for emphasis. The only time you can use italics is for the rare occasions when a book, magazine, or similar title occurs within a heading.


 * Avoid "loaded" or controversial wording. For example, if the term "terrorist" is disputed in a given setting, don't use "Terrorist attacks" as a heading. Content within a section can be used to explain, fairly, the controversy over a word or phrase, but a heading lacks necessary nuance.
 * Don't have two sections or subsections with the same heading. Though this won't bother the software that handles the links that make up the table of contents, it will confuse editors looking at edit summaries, which include the section name being edited. Matching headings also make it problematical to link from another article to the second (same-named) section or subsection.

Links and footnotes
Links and footnotes have no place in headings, but some editors put them there anyway. If you see these problems, fix them:


 * Links never go inside headings. Even if the heading is (or contains) the title of another Wikipedia article, don't wikilink it. Instead, the first paragraph of the section should mention—and link to—that article. (Links in headings also cause accessibility problems for visually impaired readers using special software to read Wikipedia articles.)
 * Don't put a footnote into a section heading. It looks ugly, and since a heading should be a noun clause, not a sentence, it shouldn't require a source. If you're using a single source for an entire section, add a footnote at the end of each paragraph in the section, not in the section heading.

Incoming links to article sections
If you find errors in section headings, like those just described, fix them. But occasionally fixing a section heading (changing or even deleting it) can cause a problem—when another article links to that section heading. Wikilinks from one article to another are very common; wikilinks from an article to a section of another article are rare. When they do occur, these links are also very brittle, meaning that if a single character of a section heading is changed, the link breaks. (When that happens, Wikipedia sends the reader to the top of the article page, rather than displaying an error message, so a damaged link isn't fatal, just irritating.)

The guideline Manual of Style (shortcut WP:MOS) says "" In this case, the guideline is giving you questionable advice. First, since incoming links to article sections are rare, changing a heading isn't very dangerous. Second, trying to "locate and fix broken links" can be a wild goose chase. Unless a section heading is unusually worded, a search for that phrase could yield hundreds of Wikipedia articles. You can try "What links here", but if there are more than a couple of articles linking to the one you're looking at, you're still facing a lot of effort that's unlikely to pay off.

Instead, tell other editors when you create a link to section in an article. That way, they know to avoid changing the heading (or adjust the link if they do). By the same token, check whether there's such an indication on a section heading you're changing or deleting, so you can keep the link functional. Here's how to do these things:

After you create a link to a section in an article, leave an editor's note (a comment that's visible only in edit mode) to tell other editors what you've done. Let's say you're linking to a section called "Evolutionary implications", and that you're linking from the article Richard Dawkins. Here's what the section heading should look like after you've posted your note:

Coming from the other direction, suppose you want to change the section heading "Evolutionary implications" to "Evolutionary and other implications". You see the editor's note, and realize that changing the heading will damage the wikilink in the Richard Dawkins article. Go ahead and change the section heading, and then go to the Dawkins article and find the wikilink, which will include the following text:


 * Somearticlename#Evolutionary implications

The "#" indicates the start of a section heading. Edit that wikilink so it reads:


 * Somearticlename#Evolutionary and other implications

Now the link will continue to take the reader directly to the desired section.

Improving the table of contents
Getting section headings right, as described above, makes the article's table of contents—generated automatically from those headings (see the section about your first edit)—concise and readable. You can take further steps to improve a TOC by reducing its length, or changing where it's located and how text flows around it.

Reducing the length of the TOC
Long tables of contents defeat the whole purpose of a table of contents, which is to provide a quick understanding of what the article is about. When TOCs get really long, readers may even have to scroll down to read the whole thing. Some readers won't realize that they can either click the small Hide link to shrink the TOC, or click the first link to jump to the top of the article's body.

A quick sampling in late 2007 of four weeks of articles featured on the Main Page found that the average number of lines in the table of contents was a succinct 16. Only four featured articles had TOCs with more than 24 lines. Since featured articles are those judged to be the best by editors, a 16-line TOC is a good goal to shoot for.

You have two approaches to getting excess lines out of a TOC—reduce the number of sections and subsections, or use one of Wikipedia's technical gizmos. Cutting down on headings is the sure-fire way to succeed, although using one of the gizmos, if applicable, may be faster.

Fewer sections and subsections
If you have sections or subsections that are very short, you can combine them. To eliminate subsections, remove subheadings and revise the text as needed. For sections, create a single section heading for the contents of two sections, and revise the transitional text. (If you haven't already done so, the section about the article body earlier in this chapter for advice about the proper length of sections and subsections.)

Another way to get fewer subsections is to spin off the content of a section that has lots of subsections into a separate article, as discussed in the section about creating a daughter article). That leaves you with just the one remaining section heading in the TOC.

If neither of these work, then your only other option is to see if Wikipedia has a technical gizmo that can help.

Technical solutions for long TOCs
Wikipedia offers two good technical solutions to shorten lengthy TOCs, and one deprecated technique that editors should avoid.


 * Keep lower-level subsections out of the TOC. Add the template TOClimit, which lets you specify which level (and above) you want the TOC to include. Figure 13-6 shows an example.




 * Using the TOClimit template has advantages and disadvantages. It reduces the white space to the right of the TOC, and shows only the most important headings, for a quicker understanding of the article. On the minus side, the reader doesn't get as good a feel for the details of the article, and can't click a link to get to a subsection that isn't shown. Another option in Figure 13-6 would be to use limit=3 instead of limit=2 as the parameter. That would reduce the TOC length to 30 lines, which is a compromise between the original length of 38 lines and the dramatically shortened 14 lines.


 * Compact TOC. These are pre-made, specialized tables of contents where multiple links to sections are on one line. Figure 13-7 shows one of the most common compact TOCs, for the 50 U.S. states.




 * Compact TOCs take up very little space, so if your article's sections match up well with an existing compact TOC, it's an excellent choice. (Typically, such articles are lists.) Figure 13-8 shows another common compact TOC, the Alphanumeric TOC.




 * You'll find a full list of compact TOCs on the page Template messages/Compact tables of contents (shortcut: WP:CTOC).


 * Don't use semicolons as pseudo-headings. Historically, semicolons at the start of the line were used to create the appearance of a heading without it showing in the table of contents. However, this created accessibility problems for disabled users, so this technique is now deprecated (see Manual of Style/Accessibility). Don't use bold or semicolon as pseudo-headings. If you see semicolons being used for headings, you should change them to use one of the above techniques instead. Figure 13-9 shows the semicolon in use.



Floating the table of contents
If you don't specify otherwise, the TOC of a Wikipedia page appears just below the lead section, on the left, with no text to its right. If the TOC is long, the reader may have to scroll quite a bit before seeing any of the body text. In many cases, you can improve the layout of articles by telling the software exactly where to put the TOC. This technique, called floating the table of contents, also wraps text around the TOC.

Figure 13-10 shows the TOC of the article Stock car racing with the standard TOC, and Figure 13-11 shows the same article, with a TOCleft template. The template tells the software exactly where to put the TOC, and makes the text wrap around the TOC.





Figure 13-12 shows the wikitext that creates the left-floating TOC in Figure 13-11. The standard location for TOCleft templates is the bottom of the lead section, to avoid accessibility problems for impaired readers. In general, a floating TOC should never be put into the middle of a section.



A less common alternative is placing the table of contents on the right, using the template TOCright. If you look at the wikitext for Figure 13-13, you see the TOCright template at the top of the edit box. No text should ever be in the lead section above this template.