GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing en.wikipedia.org — Help:Table - Wikipedia (Redirected from Help:Tables)
A table is an arrangement of columns and rows that organizes and positions information or data. Tables can be created on Wikipedia using wikitext or HTML (discouraged). HTML attributes can change how a table appears or behaves, like sorting, cell spanning, or alignment. Editing toolsVisual editingSee also: Help:Introduction to tables with VisualEditor and Help:Creating tables § Tables and visual editor
When visual editing a page, a table can be inserted at the cursor position via the toolbar's "Table" icon To help modify the table, the interface displays buttons under the table to delete the table or modify its properties. The "table properties" popup shows the following default options for the inserted table:
Text can be inserted in a selected caption or cell. When a cell is selected, the interface displays buttons to insert, move, or delete rows and columns. When selecting multiple cells, an additional merge or unmerge button appears. Use the format drop-down menu to change selected cells to "Header cell" or "Content cell". Alternatively, a non-blank table can be inserted in visual editing by highlighting the table and copy-and-pasting or drag-and-dropping the displayed table, like from web pages or in spreadsheets. A .csv file of a table can be drag-and-dropped to insert it. The interface converts those to wikitext and displays the table. However, you cannot paste wikitext or HTML here. Table modifications are done visually in visual editing, or you can switch to source editing to edit the same table before publishing. Source editingWhen source editing a page, a basic table can be inserted at the cursor position via the toolbar's "Table" icon
After insert, the following wikitext table is added, which you can then modify: Wikitext {| class="wikitable" |+ Caption text |- ! Header text !! Header text !! Header text |- | Example || Example || Example |- | Example || Example || Example |- | Example || Example || Example |} Produces
Alternatively, a table can be inserted manually using wikitext or HTML (discouraged). Table modifications are done manually in source editing, or you can switch to visual editing to edit the same table before publishing. Other toolsSee also: Help:Creating tables § Spreadsheet/database tables to wikitables, and Wikipedia:Tools § Importing (converting) content to Wikipedia (MediaWiki) format
Other tools, such as those used to create wikitext tables from Excel, can be used to create wikitext from spreadsheet and database tables. See § External links for a list of some. Basic markupIn source editing, tables can be added to pages using wikitext or HTML (discouraged). Note: Layout tables (i.e., tables used for non-data purposes) are discouraged, per MOS:LTAB. If a table is a simple list, it is generally better to use a list or prose instead, per MOS:NO-TABLES. Wiki markup
HTML attribute syntaxHTML attributes can be used to add information, affecting behavior, appearance, or accessibility. In table markup, they control cell spanning, header associations, and styling. Attributes generally appear as name–value pairs separated by an equals sign (=) with values enclosed in double quotes (") (e.g., Table markup optionally accepts one or more attributes except for table end (|}). Attributes must be on the same line as the markup. Cell and caption markup (| or ||, ! or !!, and |+) hold content. Add a pipe (|) after attributes to separate it from the content.
Table and row markup ({| and |-) do not directly hold content. Do not add a pipe (|) after attributes.
Displaying a pipe characterWhen a vertical bar (|) character is in a table's caption or cell, the parser can misinterpret it as a pipe separator for attributes and content, which can discard preceding text when attributes are absent. Options:
Other character references exist where the HTML entites are case-sensitive and the hexadecimal numeric is case-sensitive in XML/XHTML.
See {{nowrap}} for template info. Note: Avoid misuse of the magic word {{!}}. It is expanded to its character before table parsing. In visual editing, entering a vertical bar character in a cell automatically escapes the cell's content (e.g., Wikitext and HTML example
For a tutorial on wikitext table syntax, see Help:History of table pipe syntax development.
In source editing, a table can be inserted manually using wikitext or HTML (discouraged). The following produce the same table: Wikitext {| class="wikitable plainrowheaders" |+ Rock paper scissors game |- ! scope="col" | Choice ! scope="col" | Fingers ! scope="col" | Defeats |- ! scope="row" | Rock | style="text-align: center;" | 0 | Scissors |- ! scope="row" | Paper | style="text-align: center;" | 5 | Rock |- ! scope="row" | Scissors | style="text-align: center;" | 2 | Paper |} HTML <table class="wikitable plainrowheaders"> <caption>Rock paper scissors game</caption> <tr> <th scope="col">Choice</th> <th scope="col">Fingers</th> <th scope="col">Defeats</th> </tr> <tr> <th scope="row">Rock</th> <td style="text-align: center;">0</td> <td>Scissors</td> </tr> <tr> <th scope="row">Paper</th> <td style="text-align: center;">5</td> <td>Rock</td> </tr> <tr> <th scope="row">Scissors</th> <td style="text-align: center;">2</td> <td>Paper</td> </tr> </table> Produces
The MediaWiki software translates table wikitext into the following HTML:
Note: HTML tables are discouraged, per MOS:TABLES. The HTML attributes are unchanged. When a pipe (|) character separates attributes from content, it is used as a delimiter, placing the attributes inside the opening tag. The caption indicates this table is about the Rock paper scissors game. The table has 4 rows and 3 columns. The top row has column headers (Choice, Fingers, and Defeats) with HTML attributes for tablesSee also: § HTML attribute syntax
HTML attributes can be used to add information, affecting behavior, appearance, or accessibility. In table markup, they control cell spanning, header associations, and styling. The following describes global and specific attributes in relation to table markup and usage on Wikipedia:
Obsolete attributes (e.g., Whole table operationsClassOne or more {| class="wikitable sortable mw-collapsible" Some predefined classes are:
Note: Template:Table may also be used to apply classes to the table start markup. Captions and summariesFurther information: Help:Advanced table features § Tables with captions, and 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 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. Add caption markup after the table start markup before any rows. It displays at the top of the table outside the border, and is centered in desktop browsers or left aligned in mobile browsers. 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 {{sro}} template: Template:Screen reader-only. Add the template to the table caption, and then only screen reader users will see it. For example:
For current table caption and summary guidelines see the w3.org page: Caption & Summary, in Tables Tutorial. Web Accessibility Initiative (WAI). Wikitext showing left-aligned caption with a source citation: {| 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 |} Produces
Note: The related Colspan and rowspan
It is possible to create cells that stretch over two or more columns. For this, one uses Wikitext {| class="wikitable" style="text-align: center;" !col1 !col2 !col3 !col4 |- !row1 | colspan="2" | A <!-- column counting: cell 'B' can not exist --> |C |- !row2 |AA |BB |CC |- !row3 |AAA | rowspan="2" | BBB |CCC |- !row4 |AAAA <!-- row counting: cell 'BBBB' can not exist --> |CCCC |} Produces
In the code, the cell Similar: in the code, cell Wikitext {| class="wikitable" |- ! Column 1 !! Column 2 !! Column 3 |- | rowspan="2" | A | colspan="2" style="text-align: center;" | B <!-- column 3 of this row occupied by cell B (which is to the left) --> |- <!-- column 1 of this row occupied by cell A (above) --> | C | D |- | E | rowspan="2" colspan="2" style="text-align: center;" | F <!-- column 3 of this row occupied by cell F (to the left) --> |- | G <!-- columns 2 and 3 of this row occupied by cell F (above) --> |- | colspan="3" style="text-align: center;" | H <!-- columns 2 and 3 of this row occupied by cell H (to the left) --> |} Produces
Using Below is the same table with the order of the declared rows and cells shown in parentheses. The uses of Wikitext {| class="wikitable" |- ! Column 1<br>(row 1 cell 1) !! Column 2<br>(row 1 cell 2) !! Column 3<br>(row 1 cell 3) |- | rowspan="2" | A<br>(row 2 cell 1)<br><code>rowspan=2</code> | colspan="2" style="text-align: center;" | B<br>(row 2 cell 2)<br><code>colspan=2</code> |- | C<br>(row 3 cell 1) <!-- column 1 occupied by cell A --> | D<br>(row 3 cell 2) |- | E<br>(row 4 cell 1) | rowspan="2" colspan="2" style="text-align: center;" |F<br>(row 4 cell 2)<br><code>rowspan=2 colspan=2</code> |- | G<br>(row 5 cell 1) <!-- column 2+3 occupied by cell F --> |- | colspan="3" style="text-align: center;" | H<br>(row 6 cell 1)<br><code>colspan=3</code> |} Produces
Although cell C is in column 2, C is the 1st cell declared in row 3, because column 1 is occupied by cell A, which was declared in row 2. Cell G is the only cell declared in row 5, because cell F occupies the other columns but was declared in row 4. Table styleA To add style to the entire table, add the Horizontal text alignmentFurther information: Help:Table/Advanced § Horizontal alignment in cells
Text alignment (right/center/left) for the whole table (except the headers in a table using {| class="wikitable" style="text-align: right;" ... |} Text alignment for a column can be done with {{table alignment}}. HeightThe height of the whole table can be specified using standard CSS style properties on the table start markup: {| class="wikitable" style="height: 14em;" . . . |} You may also specify the § height of individual rows, and if they add up to more than the table height you specified or if word wrapping increases row height, the table height you specified will be ignored and the table height increased as needed to accommodate all the rows (except on mobile where the bottom of the table will be cut off). BordersFor tables not using the recommended If borders are added to cells and the double border look is undesirable, then replace the This example uses a solid (non-dashed), gray border that is one pixel wide: Wikitext {| style="border-spacing: 2px; border: 1px solid darkgray;" ! style="width: 140px;" | Left ! style="width: 150px;" | Center ! style="width: 130px;" | Right |- | [[File:Starred.svg |120px| center]] | [[File:Star full.svg |120px| center]] | [[File:Stargreen.svg |120px| center]] |- style="text-align: center;" | Red star || Orange star || Green star |} Note the bottom-row texts are centered by As long as the Note: The related Float table left or rightTwo table classes Wikitext This paragraph is before the table. [[File:Starred.svg |120px|right]] {| class="wikitable floatleft" |+ Caption text |- ! Header A !! Header B !! Header C |- | row 1 A || row 1 B || row 1 C |- | row 2 A || row 2 B || row 2 C |} {| class="wikitable floatright" |+ Caption text |- ! Header A !! Header B !! Header C |- | row 1 A || row 1 B || row 1 C |- | row 2 A || row 2 B || row 2 C |} ... Lorem text after table {{clear}} As it appears in a browser: This paragraph is before the table.
Vestibulum sapien nisl, ornare auctor, consectetuer quis, posuere tristique, odio. Fusce ultrices ullamcorper odio. Ut augue nulla, interdum at, adipiscing non, tristique eget, neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut pede est, condimentum id, scelerisque ac, malesuada non, quam. Proin eu ligula ac sapien suscipit blandit. Suspendisse euismod. Ut accumsan, neque id gravida luctus, arcu pede sodales felis, vel blandit massa arcu eget ligula. Aenean sed turpis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec sem eros, ornare ut, commodo eu, tempor nec, risus. Donec laoreet dapibus ligula. Praesent orci leo, bibendum nec, ornare et, nonummy in, elit. Donec interdum feugiat leo. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Pellentesque feugiat ullamcorper ipsum. Donec convallis tincidunt urna. Centering tablesNote: Centered tables should generally be avoided in articles, per MOS:TABLELEFT. The guidance below applies primarily to other namespaces. To center a table horizontally, use the Wikitext Text before table... {| class="wikitable" style="margin: 1em auto; border: none;" |+ Centered table |- ! Duis !! aute !! irure |- | dolor || in reprehenderit || in voluptate velit |- | esse cillum dolore || eu fugiat nulla || pariatur. |} ...text after table As it appears in a browser: Text before table...
...text after table. Tip: For Android Chrome, use:[note 2] {| style="margin: 1em auto; border: none;" Note: The related Static ('sticky') headersHeaders can be frozen so they are always at the top (or left) as one scrolls through a large table. See {{Sticky header}} and {{Sticky table start}}. Nested tables
Editors sometimes use headerless tables as an aid to content layout, especially where it is easier than the equivalent use of divs and CSS styling. For complex layouts, Nested tables must start on a new line. In the following example, five different tables are shown nested inside the cells of a sixth, main table. None has any header cells. Automatically, the two tables |A| and |B|B| are vertically aligned instead of the usual side-by-side of text characters in a cell.
Wikitext {| style="border: 1px solid black;" | style="border: 1px solid black;" | α | style="border: 1px solid black; text-align: center;" | cell2 {| style="border: 2px solid black; background: #ffffcc; color: inherit;" <!-- The nested table must be on a new line --> | style="border: 2px solid darkgray;" | NESTED |- | style="border: 2px solid darkgray;" | TABLE |} | style="border: 1px solid black; vertical-align: bottom;" | the original table again | style="border: 1px solid black; width: 100px" | {| style="border: 2px solid black; background: #ffffcc; color: inherit;" | style="border: 2px solid darkgray;" | A |} {| style="border: 2px solid black; background: #ffffcc; color: inherit;" | style="border: 2px solid darkgray;" | B | style="border: 2px solid darkgray;" | B |} | style="border: 1px solid black; width: 50px" | {| style="border: 2px solid black; background: #ffffcc; color: inherit; float: left" | style="border: 2px solid darkgray;" | C |} {| style="border: 2px solid black; background: #ffffcc; color: inherit; float: right" | style="border: 2px solid darkgray;" | D |} |} Column operationsThere are column and cell operations for width. See Help:Width of tables, columns, and cells. There are also column, cell, and table operations for text alignment (right, left and center alignment). See Help:Table/Advanced#Column alignment. It is part of a much larger section of info on aligning text in individual table cells, or the table as a whole. See also: {{table alignment}}. This template allows easy aligning of text in a column, or multiple columns. To insert, remove, or rearrange whole columns, see Help:Creating tables#Move/delete row/column. This is much faster and easier to do in visual editing than in source editing. If there are many year columns there is a fast way to rearrange them here: Help:Tables and locations#Put most recent year to left. To sort some or all columns in a table see Help:Sortable tables. WidthThis is a complex subject. Please see the main page: Row operationsRow styleFurther information: § Height, and § Setting borders
Row style properties (height, width, borders, text alignment, background color, bolding, italics, etc.) can be added after the row markup. Here is an example increasing the height of the middle row. The top row has italic text. The last row has bold text and a yellow background. Either the word yellow can be used, or the hex-color (such as #FFFF00): Wikitext {| class="wikitable" |- ! Left !! Center !! Right |- style="font-style: italic;" | Top left || Top center || Top right |- style="height: 9em;" id="mid" | Middle left || Middle center || Middle right |- style="font-weight: bold; background-color: yellow; color: inherit;" | Bottom left || Bottom center || Bottom right |} Produces
The row also contains an Row numbersTable rows may be numbered with the assistance of templates provided for the purpose. See Help:Sortable tables sections on row numbers, and these templates:
Link directly to a rowFurther information: Help:Tables and locations § Section link or map link to a row anchor
You can link directly to a table's row, by including an For example, you can add this:
and then link to it using
Cell operationsScopeFor headers in data tables, the Note: Do not use the The Wikitext {| class="wikitable plainrowheaders" |+ The table's caption ! scope="col" | Column header 1 ! scope="col" | Column header 2 ! scope="col" | Column header 3 |- ! scope="row" | Row header 1 | Cell 2 || Cell 3 |- ! scope="row" | Row header A | Cell B || Cell C |} Produces
Vertical alignment in cellsSee also: Template:Table vertical alignment
By default, text is aligned to the vertical middle of the cell (2nd column in table below). CSS can be used to vertically align individual cells, or single rows.
Relevant wikitext: | style="vertical-align: top" | Top-aligned | style="vertical-align: middle" | Middle-aligned | style="vertical-align: bottom" | Bottom-aligned The example below illustrates the need for top alignment of a row.
To align the text to the top of each cell in the row, apply the Wikitext {| class="wikitable" |- style="vertical-align: top" ! scope="row" | Row header | A longer piece ... | Short text |} Produces
Documentation and more options for the CSS Note: The related Cell content indenting and paddingThe contents of a cell can be indented or padded on any side. Also, the text can be aligned. In the third row the text is aligned to the right. See the following examples. Wikitext {| class="wikitable" |- | Cell content that is not indented or padded |- | style="padding-left: 2em;" | <code>style="padding-left: 2em;"</code> |- | style="text-align: right; padding-right: 2em;" | <code>style="text-align: right; padding-right: 2em;"</code> |- | style="padding-top: 2em;" | <code>style="padding-top: 2em;"</code> |- | style="padding-bottom: 2em;" | <code>style="padding-bottom: 2em;"</code> |- | style="padding: 3em 5%;" | <code>style="padding: 3em 5%;"</code> {{space|4}} (Top and Bottom: 3em. Left and Right: 5%) |- | style="padding: 3em 4em 5%;" | <code>style="padding: 3em 4em 5%;"</code> {{space|4}} (Top: 3em. Left and Right: 4em. Bottom: 5%) |- | style="padding: 3%;" | <code>style="padding: 3%;"</code> {{space|4}} (Top, Right, Bottom, and Left: all 3%) |- | style="padding: 1em 20px 8% 9em;" | <code>style="padding: 1em 20px 8% 9em;"</code> {{space|4}} (Top: 1em. Right: 20px. Bottom: 8%. and Left: 9em.) |} Produces
The Similar shorthand properties exist, such as Note: The related Individual cell bordersThe same § CSS used for tables can be used in cell markup to put a border around each cell: Wikitext {| style="border-spacing: 2px; border: 1px solid darkgray;" ! style="width: 140px;" | Left ! style="width: 150px;" | Center ! style="width: 130px;" | Right |- style="text-align: center;" | style="border: 1px solid blue;"| [[File:Starred.svg |120px]] | style="border: 1px solid #777777;"| [[File:Star full.svg |120px]] | style="border: 1px solid #22AA55;"|<!-- greenish border --> [[File:Stargreen.svg |120px]] |- style="text-align: center;" |Red star || Orange star || Green star |} Only the image cells have individual borders, not the text. The lower hex-colors (e.g., #616161) are closer to black. Typically, all borders in a table would be one specific color.
The
Wikitext {| ! style="border-top: solid;" | <code>style="border-top: solid;"</code> |- | style="border-top: solid 2px red; border-right: dashed 3px green; border-bottom: double 5px blue; border-left: dotted 6px yellow;" |<pre>border-top: solid 2px red; border-right: dashed 3px green; border-bottom: double 5px blue; border-left: dotted 6px yellow;</pre> |} Produces
To set the left, right, bottom, or top border of a single cell, one may use These values are ordered according to the § pattern described here.
For instance, Wikitext {| class="wikitable" |- | Top_Left <!-- border-style: top right bottom left; --> | style="border-style: solid solid none none;" | Top_Center | Top_Right |- | style="border-style: none none solid solid;" | Middle_Left | style="border-style: none none none none;" | Middle_Center | style="border-style: solid solid none none;" | Middle_Right |- | Bottom_Left | style="border-style: none none solid solid;" | Bottom_Center | Bottom_Right |} Produces
Note, however, that in the following table, none of the central cell's (i.e., Middle_Center) borders are removed despite the attribute Wikitext {| class="wikitable" |- | Top_Left || Top_Center || Top_Right |- | Middle_Left | style="border-style: none none none none;" | Middle_Center | Middle_Right |- | Bottom_Left || Bottom_Center || Bottom_Right |} Produces
This happens because Wikitext {| class="wikitable" |- | Top_Left || Top_Center || Top_Right |- | Middle_Left <!-- 'border-style: top right bottom left;' --> | style="border-style: none none none none;" | Middle_Center | style="border-style: none none none none;" | Middle_Right <!-- In the above line, the three left-most "none" values can be replaced with "solid" (or other valid values) and there would be no change to the table that is displayed. Only the fourth value, which is Middle_Right's left border, needs to be "none". For example, the line above could be replaced with: | style="border-style: solid solid solid none;" | Middle_Right --> |- | Bottom_Left || Bottom_Center || Bottom_Right |} Produces
To remove selected external borders of a table, both remove them from the adjacent cells and begin the whole table with: Replacing Table cell templatesSee also: Template:Shade
See {{table cell templates}} for a large set of templates to configure text and color in cells in a standard way, producing stock output. For example: "Yes" (
For example, see Comparison of text editors, which makes frequent use of table cell templates. TooltipsYou can add tooltips to columns by using the {{Tooltip}} template. Simply replace the column-title with WorkaroundsScrolling tablesSee Help:Advanced table features § Scrolling tables and the following sections for scrolling, sticky headers, and combinations thereof. Overflowing tablesSee also: Template:Sticky table start
A wide table that overflow past the main content container can overlap UI elements, and a horizontal scrollbar displays at the bottom of the page. To fix this, wrap the table in a Place the following <div class="noresize"> {| ... |} </div> Caption is centered on non-mobile versions, so super wide tables on narrow screens can make it fully or partially hidden. Left align the caption so it has maximum visibility without needing to scroll to realize it exists, or break the table into smaller ones. |+ style="text-align: left;" | Caption Non-rectangular tablesSee Template:diagonal split header to split the content of specific cells. ClassesSee also: Help:User style and Help:CSS
There are several other CSS classes, besides the basic In the table start markup, instead of specifying inline CSS via the
Instead of remembering table parameters, you just include an appropriate class. This helps keep table formatting consistent, and can allow a single change to the class to fix a problem or enhance the look of all the tables that are using it at once. For instance, this: Wikitext {| style="border-spacing: 2px;" |+ Multiplication table |- ! scope="col" | × ! scope="col" | 1 ! scope="col" | 2 ! scope="col" | 3 |- ! scope="row" | 1 | 1 || 2 || 3 |- ! scope="row" | 2 | 2 || 4 || 6 |} Produces
Becomes this: Wikitext {| class="wikitable" |+ Multiplication table |- ! scope="col" | × ! scope="col" | 1 ! scope="col" | 2 ! scope="col" | 3 |- ! scope="row" | 1 | 1 || 2 || 3 |- ! scope="row" | 2 | 2 || 4 || 6 |} Produces
Simply by replacing inline CSS for the table by Wikitext {| class="wikitable" style="font-style: italic; font-size: 120%; border: 3px dashed red;" |+ Multiplication table |- ! scope="col" | × ! scope="col" | 1 ! scope="col" | 2 ! scope="col" | 3 |- ! scope="row" | 1 | 1 || 2 || 3 |- ! scope="row" | 2 | 2 || 4 || 6 |} Produces
Notice that the table retains the gray background of the Indenting tablesWhile tables should not normally be indented, when their surrounding paragraphs are also indented, you can indent tables using To achieve the same indentation as a colon, use Wikitext {| class="wikitable" style="margin-left: 1.6em;" |- ! Header 1 ! Header 2 |- | row 1, cell 1 | row 1, cell 2 |- | row 2, cell 1 | row 2, cell 2 |} Produces
Tables on talk pages
Only applying indentation before the table start markup is sufficient to indent the entire table.
Do not attempt to use colons for indentation anywhere within the rest of the table markup (not even at the beginning of a line), as that will prevent the MediaWiki software from correctly reading the table markup. Public domain image tablesSee Commons:Template:PD-chart. Many image tables and charts are in the public domain unless they contain copyrightable things such as photos, etc. Those can be removed. It may be difficult or time-consuming to convert a table on the web to wikitext, especially if it cannot be copied and pasted into the visual editor or a spreadsheet. It can be even more time-consuming if it is both difficult and regularly updated. Or you may not have the skill yet to convert PDF tables, or complex HTML tables, to wikitext. So it is OK to take a screenshot, crop out the table with any image editor, and upload it to the Wikimedia Commons. Add {{PD-chart}} to it. An image table is better than no table, at least until someone can convert it to wikitext. Avoid using images in place of tables or charts. See MOS:ACCIM, WP:IUP#FORMAT, and MOS:DIAGRAM#Presentation. There are many off-wiki tables with colored cells that meet WCAG access standards. Currently, there does not seem to be a way to copy those tables to a wiki and keep styling such as colors (background or text color). It is possible to convert PDF tables to Excel and keep the colors. Or to HTML tables and keep the colors. But there does not seem to be a way to copy any of those colored tables (PDF, Excel, HTML, etc.) to a wiki. If there is a way, please leave a note on Help talk:Table. One can keep the coloring by copying the table as an image. This may be necessary for frequently updated colored tables where it would be too time consuming to add color to many cells after each update. See alsoNote: See top of page for more links to table help pages.
Templates
Some commonly used table templates using TemplateStyles:
Notes
ReferencesExternal links
Wikimedia sister projects
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||