Jump to content

Wikipedia:Manual of Style/Tables

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Musdan77 (talk | contribs) at 18:33, 29 January 2013 (Appropriate: Adding filmography from WP:FILMOGRAPHY). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Tables are a way of presenting links, data or information in rows and columns. They can be useful for a variety of content presentations on Wikipedia, though should be used only when appropriate; sometimes the information in a table may be better presented as prose paragraphs or as an embedded list.

Avoid referring to tables as being on the left or right. Placement is different for viewers of the mobile version of Wikipedia, and is meaningless to people having pages read to them by assistive software. Instead, use captions to identify tables.

Formatting

It is recommended that wikitables be used in place of HTML tables, as they are easier to customize and maintain. A standard "wikitable style" is also available, by adding class="wikitable" to the top row of the table. Tables can be made sortable by adding class="sortable" to the top row. Sortable tables cannot contain any merged cells using rowspan; extreme caution should be applied if colspan is used. It is also possible to combine class, as in class="wikitable sortable".

Captions and headings

Table captions and column/row headings should be succinct and self-explanatory. In most cases, individual words or sentence fragments should be used, and articles (a, an, the) are unnecessary. Only the first word in the caption or heading should be capitalized (except for proper nouns), in keeping with Wikipedia's conventions for capital letters.

Appearance

In general, styles for tables and other block-level elements should be set using CSS classes, not with inline style attributes. This is because the site-wide CSS is more carefully tested to ensure compatibility with a wide range of browsers; it also creates a greater degree of professionalism by ensuring a consistent appearance between articles. Deviations from standard conventions are acceptable where they create a semantic distinction (for instance, the infoboxes and navigational templates relating to The Simpsons use a yellow colour-scheme instead of the customary mauve, to tie in with the dominant colour in the series) but should not be used gratuitously.

See WP:Deviations and Wikipedia talk:Consensus/RfC for guidance on use of colouring or non-standard formatting, and for when MoS and WikiProjects guidance is at variance.

Consideration may be given to collapsing tables which consolidate information covered in the prose.

Accessibility

Screen readers and other web browsing tools make use of specific table tags to help users navigate the data contained within them. Use the correct wikitable pipe syntax to take advantage of all the features available.

Do not separate items by leaving blank lines between them, even when using unordered or definition lists.

Size

Splitting lists and tables per summary style is advised against.

Too much statistical data is against policy.

Appropriate

When tables are appropriate

Tables are a way of presenting links, data, or information in rows and columns. They are a complex form of list. Tables might be used for presenting mathematical data such as multiplication tables, comparative figures, or sporting results. They might also be used for presenting equivalent words in two or more languages; for awards by type and year; complex discographies; etc.

Often a list is best left as a list. Before you format a list in table form, consider whether the information will be more clearly conveyed by virtue of having rows and columns. If so, then a table is probably a good choice. If there is no obvious benefit to having rows and columns, then a table is probably not the best choice.

Tables should not be used simply for layout, either. If the information you are editing is not tabular in nature, it probably does not belong in a table: Try not to use tables for putting a caption under a photograph, arranging a group of links, or other strictly visual features. It makes the article harder to edit for other Wikipedians. Also, when compared with tables, wikimarkup is more flexible, easier to use, and less esoteric when used for desktop publishing, page elements, and page orientation and positioning.

Examples:

Sporting results
Outcome No. Year Championship Opponent in the final Score Ref.
Winner 1. 1981 World Championship Wales Doug Mountjoy 18–12 [1]
Winner 2. 1983 World Championship (2) Canada Cliff Thorburn 18–6 [1]
Winner 3 1983 International Open Canada Cliff Thorburn 9–3 [2]
Winner 4. 1984 Classic England Tony Meo 9–8 [3]
Winner 5. 1984 World Championship (3) England Jimmy White 18–16 [1]
Winner 6. 1984 International Open (2) England Tony Knowles 9–2 [2]
Winner 7. 1984 UK Championship Northern Ireland Alex Higgins 16–8 [4]
Runner-up 1. 1985 World Championship Northern Ireland Dennis Taylor 17–18 [1]
Winner 8. 1985 Grand Prix Northern Ireland Dennis Taylor 10–9 [5]
Winner 9. 1985 UK Championship (2) England Willie Thorne 16–14 [4]
Discographies
Year Title Peak chart positions Certifications
CAN
[6]
AUS
[7]
AUT
[8]
GER
[9]
NLD
[10]
NOR
[11]
SWE
[12]
SWI
[13]
UK
[14]
US
[6]
North America
[15][16]
Europe
[17][18]
1993 So Far So Good
  • Released: November 2, 1993
  • Label: A&M
2
[19]
1 1 1 1 1 1 1 1 6 CA: 6× Platinum
US: 5× Platinum
SW: 4× Platinum
UK: 3× Platinum
1999 The Best of Me
  • Released: November 15, 1999
  • Label: A&M
14 18 4 7 13 2 20 3 12 CA: 3× Platinum EU: 2× Platinum[20]
SW: Platinum
UK: Platinum
2005 Anthology
  • Released: October 18, 2005
  • Label: A&M
4 28 30 39 29 65 CA: 2× Platinum UK: Gold
2010 Icon
"—" denotes releases that did not chart.
Filmographies
List of acting performances in film and television
Year Title Role Notes Source
1961 Barabbas Patrician in Arena uncredited
1962 Hemingway's Adventures of a Young Man undetermined role uncredited
1963 The Beverly Hillbillies Janet Trego TV series, 15 episodes
1963 Mister Ed
  • Telephone Operator
  • Sailor's Girl
  • TV series, episodes:
  • "Love Thy New Neighbor"
  • "Ed Discovers America"
1964 The Americanization of Emily Beautiful Girl uncredited
1965 The Man from U.N.C.L.E. Therapist TV series, episode: "The Girls of Nazarone Affair"
1966 Eye of the Devil Odile de Caray
1967 The Fearless Vampire Killers Sarah Shagal
1967 Don't Make Waves Malibu
1967 Valley of the Dolls Jennifer North
1968 Rosemary's Baby Girl at Party uncredited
1968 The Wrecking Crew Freya Carlson
1969 The Thirteen Chairs
(also known as 12+1)
Pat released posthumously
Mathematical tables
Multiplication table
× 1 2 3 4 5 6 7 8 9 10
1 1 2 3 4 5 6 7 8 9 10
2 2 4 6 8 10 12 14 16 18 20
3 3 6 9 12 15 18 21 24 27 30
4 4 8 12 16 20 24 28 32 36 40
5 5 10 15 20 25 30 35 40 45 50
6 6 12 18 24 30 36 42 48 54 60
7 7 14 21 28 35 42 49 56 63 70
8 8 16 24 32 40 48 56 64 72 80
9 9 18 27 36 45 54 63 72 81 90
10 10 20 30 40 50 60 70 80 90 100
 Crocodylinae 
Flow data

When tables may not be appropriate

Simple lists

If a list is simple, it is generally better to use one of the standard Wikipedia list formats instead of a table. Lists are easier to maintain than tables, and are often easier to read.

Here is an example of a simple list using list formatting:

* 1980: Ultra Wave
* 1988: What's Bootsy Doin'?
* 1994: Blasters of the Universe
* 1994: Fresh Outta 'P' Uni

Which produces:

  • 1980: Ultra Wave
  • 1988: What's Bootsy Doin'?
  • 1994: Blasters of the Universe
  • 1994: Fresh Outta 'P' Uni

versus table formatting:

{|
|1980
|Ultra Wave
|-
|1988
|What's Bootsy Doin'?
|-
|1994
|Blasters of the Universe
|-
|1994
|Fresh Outta 'P' Uni
|}

Which produces:

1980 Ultra Wave
1988 What's Bootsy Doin'?
1994 Blasters of the Universe
1994 Fresh Outta 'P' Uni
Prose

Prose is preferred in articles as prose allows the presentation of detail and clarification of context, in a way that a table may not. Prose flows, like one person speaking to another, and is best suited to articles, because their purpose is to explain. Tables which are mainly links, which are most useful for browsing subject areas, should usually have their own entries: see Wikipedia:Stand-alone lists for detail. In an article, significant items should normally be mentioned naturally within the text rather than merely tabulated.

Page layout

Page layouts (using multiple columns, positioning elements, adding borders, etc.) should be done via CSS, not tables, whenever possible.

  • Images and other embedded media should be positioned using standard image syntax.
  • There are several templates available that will create preformatted multi-column layouts: see Help:Columns.
  • Other elements can be positioned or given special formatting through the use of the HTML <div> element and CSS styling.

See also

References

  1. ^ a b c d Turner, Chris. "World Professional Championship". cajt.pwp.blueyonder.co.uk. Chris Turner's Snooker Archive. Retrieved 18 March 2011.
  2. ^ a b Turner, Chris. "International Open Goya, Matchroom Trophy". cajt.pwp.blueyonder.co.uk. Chris Turner's Snooker Archive. Retrieved 18 March 2011.
  3. ^ Turner, Chris. "Classic". cajt.pwp.blueyonder.co.uk. Chris Turner's Snooker Archive. Retrieved 18 March 2011.
  4. ^ a b Turner, Chris. "UK Championship". cajt.pwp.blueyonder.co.uk. Chris Turner's Snooker Archive. Retrieved 18 March 2011.
  5. ^ Cite error: The named reference Turner GP was invoked but never defined (see the help page).
  6. ^ a b Cite error: The named reference US was invoked but never defined (see the help page).
  7. ^ Cite error: The named reference AUS was invoked but never defined (see the help page).
  8. ^ Cite error: The named reference AUT was invoked but never defined (see the help page).
  9. ^ Cite error: The named reference GER was invoked but never defined (see the help page).
  10. ^ Cite error: The named reference NLDA was invoked but never defined (see the help page).
  11. ^ Cite error: The named reference NOR was invoked but never defined (see the help page).
  12. ^ Cite error: The named reference SWE was invoked but never defined (see the help page).
  13. ^ Cite error: The named reference SWIA was invoked but never defined (see the help page).
  14. ^ Cite error: The named reference UK was invoked but never defined (see the help page).
  15. ^ Cite error: The named reference CRIA was invoked but never defined (see the help page).
  16. ^ Cite error: The named reference RIAA was invoked but never defined (see the help page).
  17. ^ Cite error: The named reference SWI C was invoked but never defined (see the help page).
  18. ^ Cite error: The named reference BPI was invoked but never defined (see the help page).
  19. ^ "Top Albums/CDs – Volume 58, No. 25". RPM (Library and Archives Canada). January 10, 1994. Retrieved August 15, 2010. {{cite web}}: Italic or bold markup not allowed in: |publisher= (help)
  20. ^ "IFPI Platinum Europe Awards: 2002 Awards". International Federation of the Phonographic Industry (IFPI) – Europe. Retrieved August 15, 2010.