Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Help:Table
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Captions and summaries === {{More|Wikipedia:Manual of Style/Accessibility/Data tables tutorial#Proper table captions and summaries}} Explicit table ''captions'' (or ''titles'') are recommended for data tables as a best practice; the Wikipedia Manual of Style [[Wikipedia:Manual of Style/Accessibility/Data tables tutorial#Correct table captions|considers them a high priority]] for accessibility reasons ([[screen readers]]), as a caption is explicitly associated with the table, unlike a normal wikitext heading or introductory sentence. All data tables on Wikipedia require captions. A caption is provided with the <code>|+</code> markup, similar to a table row (<code>|-</code>), but it does not contain any cells, and is not within the table border. Captions are always displayed, appearing as a title centered (in most browsers), above the table. A caption can be styled (with inline, not block, CSS), and may include wikilinks, reference citations, etc. Many article editors dislike table captions when the table is directly below, or not far away from, a similar article heading. But [[screen reader]] users still need a table caption to quickly browse from table to table. In this case use the popular {{t|sro}} template: '''[[Template:Screen reader-only]].''' Add the template to the table caption, and then only screen reader users will see it. Example: :<syntaxhighlight lang="wikitext" inline>|+ {{sro|Table caption}}</syntaxhighlight> For current table caption and summary guidelines see the w3.org page: '''[https://www.w3.org/WAI/tutorials/tables/caption-summary Caption & Summary, in Tables Tutorial].''' [[Web Accessibility Initiative]] (WAI). The summary info in the paragraph below is out of date: A {{em|summary}} provides an overview of the data of a table for text and audio browsers, and does not normally display in graphical browsers. The summary (also a high Manual of Style priority for tables) is a synopsis of content, and does not repeat the caption text; think of it as analogous to an image's <code>alt</code> description. A summary is added with <code>summary="{{var|Summary text here.}}"</code>, on the same line as the <code><nowiki>{|</nowiki></code> that opened the table, along with any <code>class=</code> and other parameters for the table as a whole. <!--{{em|The summary cannot be styled, wikilinked, or otherwise marked up, but must be simple, plain text. It cannot even include italics.}} (It may contain character entity codes, such as <code>&ndash;</code>.)--> '''The <code>summary=</code> attribute is, however, [[Wikipedia:HTML 5#Table_attributes|obsolete in HTML 5]].''' <div class="box" style="max-width:30em;"> '''Wiki markup''' example showing left-aligned caption with a source citation: <syntaxhighlight lang="wikitext"> {| class=wikitable |+ style="text-align: left;" | Data reported for 2014β2015, by region<ref name="Garcia 2005"/> |- ! scope=col | Year !! scope=col | Africa !! scope=col | Americas !! scope=col | Asia & Pacific !! scope=col | Europe |- ! scope=row | 2014 | 2,300 || 8,950 || ''9,325'' || 4,200 |- ! scope=row | 2015 | 2,725 || ''9,200'' || 8,850 || 4,775 |} </syntaxhighlight></div> <div class="box"> '''Produces''' {| class=wikitable |+ style="text-align: left;" | Data reported for 2014β2015, by region{{dummy ref|99}} |- ! scope=col | Year !! scope=col | Africa !! scope=col | Americas !! scope=col | Asia & Pacific !! scope=col | Europe |- ! scope=row | 2014 | 2,300 || 8,950 || ''9,325'' || 4,200 |- ! scope=row | 2015 | 2,725 || ''9,200'' || 8,850 || 4,775 |} </div>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)