Lists and tables are two different ways to format multiple, similar items on a page. Lists and HTML tables go back to Wikipedia's early days. The current wikicode tables (see the section about tables), which you can edit more easily and even sort, came later.
You'll find many more lists than tables on Wikipedia. For example, the External links sections that appear in almost every Wikipedia article are lists. Tables are less common, but they're making up ground fast. You'll probably have occasion to edit a table, if not make one. This chapter shows you how to create and edit both lists and tables.
Wikipedia has two kinds of lists: embedded lists (a list within a larger article), and standalone lists (an article that's only a list). An example of the latter is the article List of science fiction novels. Embedded lists are easier to grasp, both conceptually and in terms of formatting, although you won't have trouble understanding articles that are lists.
Lists are easy to create, but sometimes you really shouldn't. Before you make a list, read the first part of this section and think about whether you could present the information in narrative form. When you're ready to make a list, skip to the section about creating lists to see how to create the underlying wikitext.
Wikipedia articles are intended to be narratives, not guides or places for stockpiling information, as explained at What Wikipedia is not (shortcut: WP:NOT). So first ask yourself, when you see a list in an article, or when you're considering adding a list to an article, whether that list even belongs in an article. Some cases are very clear: A list of links in the External links section of an article absolutely needs to be there, in list format. But in an article about a nonprofit organization, a full list of the 45 members of its advisory board would be a violation of WP:NOT.
Some editors feel that the more information an article contains, the better. Long lists tend to prove the opposite: They take up valuable editing time to create and maintain, and they're distracting. In the nonprofit organization example, readers who are really interested in who's on the advisory board can find out by going to the organization's Web site. If there are a few notable board members, you can simply mention them in a quick sentence. ("The advisory board includes Michael Dell, Al Gore, and David Hasselhoff.")
If you decide that some or all the items in a list belong in a Wikipedia article, your next decision is whether to use a formal list; that is, one using wiki markup. For example, Figure 14-1 shows two ways of presenting the same information, with a list and without.
Popular opinion at Wikipedia is against lists in articles, particularly numbered lists, if narrative is an alternative. But sometimes a bulleted list can break up what would otherwise be an overly large, gray mass of text, particularly if the topic is dry or complex. (Put differently, sometimes bulleted narrative makes sense.) You'll find a nuanced discussion of bulleted lists versus fully narrative text at the guideline Wikipedia:Embedded list (shortcut WP:EMBED).
To create a list in Wikipedia, you add special characters to the text of the list items. The special characters tell the software how to format the list onscreen. The combination of text and formatting characters is called wikitext. In Figure 14-2, you can see the underlying wikitext that creates the bulleted list in Figure 14-1.
To create a list, simply go into edit mode, type or paste the list items (each on a separate line), and then type an asterisk (*) at the beginning of each list item for a bulleted list or a pound sign (#) to create a numbered list. Figure 14-3 shows the same list used in previous examples, this time as a numbered list. Generally, a numbered list should only be used for lists where ordering is important, such as steps in a process, or chronological lists.
Lists often begin as sections of an article, and then expand. At some point, a list can become too long to be part of an article, and needs to be spun off as a separate "List of" article. In the section about daughter articles, you can find step by step instructions for spinning off a section into an article of its own (in fact, the example in that section is a list).
Standalone lists are Wikipedia articles that are basically one big list, usually consisting of links to articles in a particular subject area; for example, North American mammals, or economists, or events listed chronologically. The titles of these articles almost always begin with the phrase words "List of" or "Timeline of". (There's an occasional "Glossary of", which is a sort of list, and a few pages called "Graphical timeline of", as well.) Standalone lists, like other articles, are subject to Wikipedia's content policies, including verifiability, no original research, and neutral point of view.
Lists need to be about notable things. Red links (wikilinks to non-existent articles, which show as red instead of blue) are allowed in lists, but only in small amounts. A preponderance of red links probably means that the subject isn't notable enough to be on Wikipedia. For example, an article called List of high school science teachers in New York City, with entries that include only a couple of blue links, would make the article at best a guide and at worst a vanity article, both of which are disallowed by WP:NOT.
Lists that are too general or too broad in scope have little value. For example, a list of brand names would be far too long to be useful (it would also require Herculean efforts by a fairly large number of editors to properly maintain it). Lists that are too specific are also a problem. For example, an article List of one-eyed horse thieves from Montana would be of little interest to anyone except the person making the list.
Lists are prone to suffering from unclear criteria or a non-neutral point of view, which may actually be the same problem. Examples include List of exploitative companies, List of authoritarian leaders, and even List of famous Brazilian people. (Change "famous" in the last example to "notable," and the problem goes away, since Wikipedia has notability criteria for articles about people, for the purposes of determining if they're entitled to a separate article in Wikipedia.)
As with everything else at Wikipedia, there isn't universal agreement about exactly what's acceptable as the subject of a list. One argument, mentioned in the essay Wikipedia:Listcruft (shortcut: WP:LC), states that the only legitimate "List of" articles start out as sections of existing narrative articles, and are only broken out when they become disproportionately long for the original article. (Essays are opinions, not policy.)
4369 articles have earned the honor of being designated Featured lists (see the section about featured content), with roughly 20 to 40 more lists being so designated each month. Figure 14-4 shows some of the criteria. The full criteria include complying with the Manual of Style ( WP:MOS) and standards of any relevant WikiProject, and making sure any images are appropriately captioned and not copyright violations.
Looking at articles designated as Featured lists can show you the variety of formats used for lists, and the astounding quality achieved by some. Figure 14-5 shows one example.
A list article in its simplest form consists of an introductory sentence or two, followed by an alphabetized bullet list of links to (mostly) existing Wikipedia articles. It resembles a category page.
If you look at the wikicode for articles that are lists, you find a number of different things:
Tables are ideal for presenting information in a row-and-column format. You create Wikipedia tables using wiki markup, which begins with "{|" and ends with "|}". Since you'll edit tables much more often than create them, this section begins with editing. (To see how to create a wikicode table, skip to the section about creating tables.)
Even if you never create a table from scratch, you still need to understand the basic structure to edit a table. Figure 14-13 shows the wikicode underlying a simple table.
Here are the elements of the wikicode that makes up a table:
When editing a table, you generally want to do one of three things: Change the content of an existing cell, add a row, or delete a row. The first is fairly straightforward: In editing mode, find where the cell starts, and add or change text. Adding a row isn't difficult either: In editing mode, find the row above or below where you want to add a row; copy that row and paste it into the table. Now you have two identical rows; edit one of them with the information you're adding. (Deleting a row is even easier than adding one; just select the lines that make up that row, and delete away.)
To test your understanding of editing tables, see if you can answer the following question: In Figure 14-13, look at the last three rows in the table. How many lines of wikicode are there for each of these three rows? (Do count the first line of each row, the line that begins "|-"; don't count any of the six blank lines inserted in the wikicode to make it easier to read.) The answer: 4 lines, 2 lines, and 2 lines, respectively. If you got that, then you're ready to copy, insert, and even delete rows from any table you find.
In your career as a Wikipedia editor, you'll make lists, as described at the beginning of this chapter, much more often then tables. First off, lists are much easier to create—for most, you just type an asterisk before each list item. Tables involve much more complex wikicode.
You probably don't want to create a table unless your information needs three or more columns. If there's only one column, you can simply display the information in a list, which is much easier to edit than a table. If there are two columns, it's still better to present information as a list (either annotated or indented, as discussed in the section about alternate list formats) unless it would be useful to sort the information by the second column. (Tables can be sorted, lists can't.) For a fuller discussion of when to create a table instead of list, check out the guideline Wikipedia:When to use tables (shortcut: WP:TABLE), which is part of Wikipedia's Manual of Style. If you're still sure you want to create a table, read on.
For the most basic table, you can use the edit toolbar's table icon to generate some starter wikicode (Figure 14-14). Then you can expand it and add your information.
You can also use a table to format a multicolumn list. To do so, use the simplified wikicode shown in Figure 14-15.
If neither of the previous two examples meets your needs, you need to create a table from scratch. Here's a quick three-step plan for creating a table:
Specifying a class for a table, such as class="wikitable", tells Wikipedia to use predefined formatting for the table. An extreme example would be putting class="wikitable sortable collapsible collapsed" into the first line of a table. That makes it a standard wikitable (governing things like how headings are formatted); sortable by clicking on a column heading; collapsible to a single row, with just a click, if a reader wants to get it out of the way; and initially displayed as a single row (collapsed) rather than fully visible when the page first opens. The collapsed option is the least common. If a table's worth adding to an article, why hide it?
You can learn more about sorting tables in the section about sortable tables. Collapsing is less common. If you really want to learn how to do it, see Help:Collapsing.
You can make tables more usable to everyone, not just normally sighted people with high resolution monitors, by doing several things:
Being able to sort a table—especially a long table—makes it much more valuable to readers. For example, some people may want to look at a list of U.S. presidents in chronological order; others want to see it alphabetically. Whenever you create or edit a table, consider whether you can make it sortable.
Sortable tables have arrows in the cells of the top row that you can click to sort by that column, as shown in Figure 14-10 (see the section about alternative list formats). The code to make a table sortable is straightforward: Instead of class="wikitable", in the first line of the table, use class="wikitable sortable".
In a sortable table, when you click an arrow, the table sorts itself based on the selected column, in ascending order. The arrow's a toggle switch: If you click it again, the table sorts itself in descending order rather than ascending order.
If you create a sortable table or change one to be sortable, you need to understand the software's logic when sorting. First, the software decides which of four types of data is in that column: dates, currency, numbers, or text (what Wikipedia calls strings). Looking down the column, the software finds the first non-blank cell and assumes that everything else in the column is in the same format. But a number of things can go wrong:
A tool described at http://de.wikipedia.org/wiki/Benutzer:Duesentrieb/csv2wp_(en) allows you to move the content – not the formatting – from an Excel spreadsheet into Wikipedia. This is useful if you have a large number of offline documents that you plan to convert into Wikipedia content. Make sure that they follow Wikipedia's rules about content being notable, verifiable, and not original research, as discussed in Chapter 4: Creating a new article before adding them to Wikipedia.
Lists and tables are two different ways to format multiple, similar items on a page. Lists and HTML tables go back to Wikipedia's early days. The current wikicode tables (see the section about tables), which you can edit more easily and even sort, came later.
You'll find many more lists than tables on Wikipedia. For example, the External links sections that appear in almost every Wikipedia article are lists. Tables are less common, but they're making up ground fast. You'll probably have occasion to edit a table, if not make one. This chapter shows you how to create and edit both lists and tables.
Wikipedia has two kinds of lists: embedded lists (a list within a larger article), and standalone lists (an article that's only a list). An example of the latter is the article List of science fiction novels. Embedded lists are easier to grasp, both conceptually and in terms of formatting, although you won't have trouble understanding articles that are lists.
Lists are easy to create, but sometimes you really shouldn't. Before you make a list, read the first part of this section and think about whether you could present the information in narrative form. When you're ready to make a list, skip to the section about creating lists to see how to create the underlying wikitext.
Wikipedia articles are intended to be narratives, not guides or places for stockpiling information, as explained at What Wikipedia is not (shortcut: WP:NOT). So first ask yourself, when you see a list in an article, or when you're considering adding a list to an article, whether that list even belongs in an article. Some cases are very clear: A list of links in the External links section of an article absolutely needs to be there, in list format. But in an article about a nonprofit organization, a full list of the 45 members of its advisory board would be a violation of WP:NOT.
Some editors feel that the more information an article contains, the better. Long lists tend to prove the opposite: They take up valuable editing time to create and maintain, and they're distracting. In the nonprofit organization example, readers who are really interested in who's on the advisory board can find out by going to the organization's Web site. If there are a few notable board members, you can simply mention them in a quick sentence. ("The advisory board includes Michael Dell, Al Gore, and David Hasselhoff.")
If you decide that some or all the items in a list belong in a Wikipedia article, your next decision is whether to use a formal list; that is, one using wiki markup. For example, Figure 14-1 shows two ways of presenting the same information, with a list and without.
Popular opinion at Wikipedia is against lists in articles, particularly numbered lists, if narrative is an alternative. But sometimes a bulleted list can break up what would otherwise be an overly large, gray mass of text, particularly if the topic is dry or complex. (Put differently, sometimes bulleted narrative makes sense.) You'll find a nuanced discussion of bulleted lists versus fully narrative text at the guideline Wikipedia:Embedded list (shortcut WP:EMBED).
To create a list in Wikipedia, you add special characters to the text of the list items. The special characters tell the software how to format the list onscreen. The combination of text and formatting characters is called wikitext. In Figure 14-2, you can see the underlying wikitext that creates the bulleted list in Figure 14-1.
To create a list, simply go into edit mode, type or paste the list items (each on a separate line), and then type an asterisk (*) at the beginning of each list item for a bulleted list or a pound sign (#) to create a numbered list. Figure 14-3 shows the same list used in previous examples, this time as a numbered list. Generally, a numbered list should only be used for lists where ordering is important, such as steps in a process, or chronological lists.
Lists often begin as sections of an article, and then expand. At some point, a list can become too long to be part of an article, and needs to be spun off as a separate "List of" article. In the section about daughter articles, you can find step by step instructions for spinning off a section into an article of its own (in fact, the example in that section is a list).
Standalone lists are Wikipedia articles that are basically one big list, usually consisting of links to articles in a particular subject area; for example, North American mammals, or economists, or events listed chronologically. The titles of these articles almost always begin with the phrase words "List of" or "Timeline of". (There's an occasional "Glossary of", which is a sort of list, and a few pages called "Graphical timeline of", as well.) Standalone lists, like other articles, are subject to Wikipedia's content policies, including verifiability, no original research, and neutral point of view.
Lists need to be about notable things. Red links (wikilinks to non-existent articles, which show as red instead of blue) are allowed in lists, but only in small amounts. A preponderance of red links probably means that the subject isn't notable enough to be on Wikipedia. For example, an article called List of high school science teachers in New York City, with entries that include only a couple of blue links, would make the article at best a guide and at worst a vanity article, both of which are disallowed by WP:NOT.
Lists that are too general or too broad in scope have little value. For example, a list of brand names would be far too long to be useful (it would also require Herculean efforts by a fairly large number of editors to properly maintain it). Lists that are too specific are also a problem. For example, an article List of one-eyed horse thieves from Montana would be of little interest to anyone except the person making the list.
Lists are prone to suffering from unclear criteria or a non-neutral point of view, which may actually be the same problem. Examples include List of exploitative companies, List of authoritarian leaders, and even List of famous Brazilian people. (Change "famous" in the last example to "notable," and the problem goes away, since Wikipedia has notability criteria for articles about people, for the purposes of determining if they're entitled to a separate article in Wikipedia.)
As with everything else at Wikipedia, there isn't universal agreement about exactly what's acceptable as the subject of a list. One argument, mentioned in the essay Wikipedia:Listcruft (shortcut: WP:LC), states that the only legitimate "List of" articles start out as sections of existing narrative articles, and are only broken out when they become disproportionately long for the original article. (Essays are opinions, not policy.)
4369 articles have earned the honor of being designated Featured lists (see the section about featured content), with roughly 20 to 40 more lists being so designated each month. Figure 14-4 shows some of the criteria. The full criteria include complying with the Manual of Style ( WP:MOS) and standards of any relevant WikiProject, and making sure any images are appropriately captioned and not copyright violations.
Looking at articles designated as Featured lists can show you the variety of formats used for lists, and the astounding quality achieved by some. Figure 14-5 shows one example.
A list article in its simplest form consists of an introductory sentence or two, followed by an alphabetized bullet list of links to (mostly) existing Wikipedia articles. It resembles a category page.
If you look at the wikicode for articles that are lists, you find a number of different things:
Tables are ideal for presenting information in a row-and-column format. You create Wikipedia tables using wiki markup, which begins with "{|" and ends with "|}". Since you'll edit tables much more often than create them, this section begins with editing. (To see how to create a wikicode table, skip to the section about creating tables.)
Even if you never create a table from scratch, you still need to understand the basic structure to edit a table. Figure 14-13 shows the wikicode underlying a simple table.
Here are the elements of the wikicode that makes up a table:
When editing a table, you generally want to do one of three things: Change the content of an existing cell, add a row, or delete a row. The first is fairly straightforward: In editing mode, find where the cell starts, and add or change text. Adding a row isn't difficult either: In editing mode, find the row above or below where you want to add a row; copy that row and paste it into the table. Now you have two identical rows; edit one of them with the information you're adding. (Deleting a row is even easier than adding one; just select the lines that make up that row, and delete away.)
To test your understanding of editing tables, see if you can answer the following question: In Figure 14-13, look at the last three rows in the table. How many lines of wikicode are there for each of these three rows? (Do count the first line of each row, the line that begins "|-"; don't count any of the six blank lines inserted in the wikicode to make it easier to read.) The answer: 4 lines, 2 lines, and 2 lines, respectively. If you got that, then you're ready to copy, insert, and even delete rows from any table you find.
In your career as a Wikipedia editor, you'll make lists, as described at the beginning of this chapter, much more often then tables. First off, lists are much easier to create—for most, you just type an asterisk before each list item. Tables involve much more complex wikicode.
You probably don't want to create a table unless your information needs three or more columns. If there's only one column, you can simply display the information in a list, which is much easier to edit than a table. If there are two columns, it's still better to present information as a list (either annotated or indented, as discussed in the section about alternate list formats) unless it would be useful to sort the information by the second column. (Tables can be sorted, lists can't.) For a fuller discussion of when to create a table instead of list, check out the guideline Wikipedia:When to use tables (shortcut: WP:TABLE), which is part of Wikipedia's Manual of Style. If you're still sure you want to create a table, read on.
For the most basic table, you can use the edit toolbar's table icon to generate some starter wikicode (Figure 14-14). Then you can expand it and add your information.
You can also use a table to format a multicolumn list. To do so, use the simplified wikicode shown in Figure 14-15.
If neither of the previous two examples meets your needs, you need to create a table from scratch. Here's a quick three-step plan for creating a table:
Specifying a class for a table, such as class="wikitable", tells Wikipedia to use predefined formatting for the table. An extreme example would be putting class="wikitable sortable collapsible collapsed" into the first line of a table. That makes it a standard wikitable (governing things like how headings are formatted); sortable by clicking on a column heading; collapsible to a single row, with just a click, if a reader wants to get it out of the way; and initially displayed as a single row (collapsed) rather than fully visible when the page first opens. The collapsed option is the least common. If a table's worth adding to an article, why hide it?
You can learn more about sorting tables in the section about sortable tables. Collapsing is less common. If you really want to learn how to do it, see Help:Collapsing.
You can make tables more usable to everyone, not just normally sighted people with high resolution monitors, by doing several things:
Being able to sort a table—especially a long table—makes it much more valuable to readers. For example, some people may want to look at a list of U.S. presidents in chronological order; others want to see it alphabetically. Whenever you create or edit a table, consider whether you can make it sortable.
Sortable tables have arrows in the cells of the top row that you can click to sort by that column, as shown in Figure 14-10 (see the section about alternative list formats). The code to make a table sortable is straightforward: Instead of class="wikitable", in the first line of the table, use class="wikitable sortable".
In a sortable table, when you click an arrow, the table sorts itself based on the selected column, in ascending order. The arrow's a toggle switch: If you click it again, the table sorts itself in descending order rather than ascending order.
If you create a sortable table or change one to be sortable, you need to understand the software's logic when sorting. First, the software decides which of four types of data is in that column: dates, currency, numbers, or text (what Wikipedia calls strings). Looking down the column, the software finds the first non-blank cell and assumes that everything else in the column is in the same format. But a number of things can go wrong:
A tool described at http://de.wikipedia.org/wiki/Benutzer:Duesentrieb/csv2wp_(en) allows you to move the content – not the formatting – from an Excel spreadsheet into Wikipedia. This is useful if you have a large number of offline documents that you plan to convert into Wikipedia content. Make sure that they follow Wikipedia's rules about content being notable, verifiable, and not original research, as discussed in Chapter 4: Creating a new article before adding them to Wikipedia.