Contents 1 Using the toolbar 2 Basic table markup summary 2.1 HTML attributes 3 Pipe syntax tutorial 3.1 Rendering the pipe 4 Examples 4.1 Simple straightforward tables 4.1.1 Minimalist table 4.1.2 Multiplication table 4.2 Whole table operations 4.2.1 Captions and summaries 4.2.2 Width, height 4.2.3 Setting borders 4.2.4 Positioning 4.2.5 Floating table 4.2.6 Centering tables 4.2.7 Nested tables 4.2.8 Scrolling 4.3 Color; scope of parameters 4.4 Cell operations 4.4.1 Setting cell parameters 4.4.2 Vertical alignment in cells 4.4.3 Cell content indenting 4.5 Row operations 4.5.1 Height 4.5.2 Border 4.5.3 Alignment 4.6 Column operations 4.6.1 Setting column widths 4.6.2 Nowrap 4.6.3 Tooltips 4.7 More complex examples 4.7.1 Mélange 4.7.2 Floating images in the center 4.7.3 Combined use of COLSPAN and ROWSPAN 4.8 Workarounds 4.8.1 Decimal point alignment 4.8.2 Non-rectangular tables 4.8.3 Centering tables 5 Classes 5.1 Collapsible tables 5.1.1 Using class mw-collapsible 5.1.2 Tables with captions 5.2 Sortable tables 5.2.1 Numerical and year sorting problems 5.2.2 Sorting and collapsing 5.3 mw-datatable 6 Cells spanning multiple rows or columns 7 Section link or map link to a row anchor 8 Row template 9 Conditional table row 10 Other table syntax 10.1 Comparison of table syntax 11 Pipe syntax in terms of the HTML produced 11.1 Tables 11.2 Rows 11.3 Cells 11.4 Headers 11.5 Captions 12 Table cell templates 13 Vertically oriented column headers 14 Wikitable as image gallery 14.1 Shifting/centering 15 Converting spreadsheets and database tables to wikitable format 16 Indenting tables 17 Tables and the Visual Editor 18 See also 18.1 Wikimedia sister projects 19 Notes 20 External links


Using the toolbar[edit] Vector toolbar – default Monobook toolbar To automatically insert a table, click or (Insert a table) on the edit toolbar. If "Insert a table" is not on the toolbar follow these directions to add it. The following text is inserted when Insert a table is clicked: {| class="wikitable" |- ! Header 1 ! Header 2 ! Header 3 |- | row 1, cell 1 | row 1, cell 2 | row 1, cell 3 |- | row 2, cell 1 | row 2, cell 2 | row 2, cell 3 |} This code produces the following table: Header 1 Header 2 Header 3 row 1, cell 1 row 1, cell 2 row 1, cell 3 row 2, cell 1 row 2, cell 2 row 2, cell 3 The sample text ("Header N" or "row N, cell N") is intended to be replaced with actual data.


Basic table markup summary[edit] See also: Help:Basic table markup {| Table start Required. |+ Table caption Optional. Only between table start and first table row. |- Table row Optional. Can be omitted before the first row and/or after the last row. ! Table header cell Optional. Consecutive table header cells may be added on same line separated by double marks (!!); or start on new lines, each with its own single mark (!). | Table data cell Optional. Consecutive table data cells may be added on same line separated by double marks (||) or start on new lines, each with its own single mark (|). This mark is also used to separate HTML attributes from cell and caption contents. |} Table end Required. The above marks must start on a new line, except the double marks (|| and !!) for optionally adding consecutive cells to a single line. Blank spaces at the beginning of a line are ignored. Content may either follow its cell mark on the same line (after any optional HTML attributes); or on lines below the cell mark. Content that uses wiki markup that itself needs to start on a new line, such as with lists, headings, or nested tables, must be on its own new line. To insert a pipe character (|) into a table caption or cell, use the <nowiki>|</nowiki> escaping markup. HTML attributes[edit] Each mark, except table end (|}), optionally accepts one or more HTML attributes. Attributes must be on the same line as the mark. Cells and caption (| or ||, ! or !!, and |+) hold content. So separate any attributes from content with a single pipe (|), with attributes preceding content. Table and row marks ({| and |-) do not directly hold content. Do not add a pipe (|) after any attributes. Commonly included attributes in tables include: class, for example class="wikitable"; style, for CSS styling; scope, to indicate row or column header cells; rowspan, to extend cells by more than one row; colspan, to extend cells by more than one column; and border, for borders for non-wikitable tables. Instead of using absolute px pixel sizing, prefer relative values with % and em units. Content can automatically shrink to fit.


Pipe syntax tutorial[edit] For an introduction to HTML and tables, see Help:Table/HTML and tables. Although HTML table syntax also works, special wikicode can be used as a shortcut to create a table. The vertical bar or "pipe" symbol ( | ) codes function exactly the same as HTML table markup, so a knowledge of HTML table code helps understand pipe code. The shortcuts are as follows: The entire table is encased with curly brackets and a vertical bar character (a pipe). So use {| to begin a table, and |} to end it. Each one needs to be on its own line: {| table code goes here |} An optional table caption is included with a line starting with a vertical bar and plus sign "|+" and the caption after it: {| |+ caption table code goes here |} To start a new table row, type a vertical bar and a hyphen on its own line: "|-". The codes for the cells in that row start on the next line. {| |+ The table's caption |- row code goes here |- next row code goes here |} Type the codes for each table cell in the next row, starting with a bar: {| |+ The table's caption |- | cell code goes here |- | next row cell code goes here | next cell code goes here |} Cells can be separated with either a new line and a single bar, a new line and a double bar, or by a double bar "||" on the same line. All three produce the same output: {| |+ The table's caption |- |Cell 1 || Cell 2 || Cell 3 |- |Cell A |Cell B |Cell C |} A row of column headers is identified by using "! scope="col" |" instead of "|", and using "!! scope="col" |" instead of "||". Header cells typically render differently from regular cells, depending on the browser. They are often rendered in a bold font and centered. The scope="col" markup is not technically necessary in wikitables styled with class markup: class="wikitable" and so on. However, it is easier for other editors to understand the markup when it is present, and the Manual of Style recommends using it because it directly associates header with corresponding cells, a boon to accessibility. {| |+ The table's caption ! scope="col" | Column header 1 ! scope="col" | Column header 2 ! scope="col" | Column header 3 |- | Cell 1 || Cell 2 || Cell 3 |- | Cell A | Cell B | Cell C |} The first cell of a row is identified as a row header by starting the line with "! scope="row" |" instead of "|", and starting subsequent data cells on a new line. The scope="row" code, as with scope="col", is not technically required in wikitables styled with class markup like class="wikitable", but it is recommended by the Manual of Style for both accessibility and code readability reasons. {| |+ 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 |} The final table displays like this: The table's caption Column header 1 Column header 2 Column header 3 Row header 1 Cell 2 Cell 3 Row header A Cell B Cell C Optional parameters can modify the display and styling of cells, rows, or the entire table. The simplest way to add styling is to set the wikitable CSS class, which in Wikipedia's external style sheet is defined to apply a gray color scheme and cell borders to tables using it: {| class="wikitable" |+ The table's caption ! Column header 1 ! Column header 2 ! Column header 3 |- ! Row header 1 | Cell 2 || Cell 3 |- ! Row header A | Cell B | Cell C |} Which produces this: The table's caption Column header 1 Column header 2 Column header 3 Row header 1 Cell 2 Cell 3 Row header A Cell B Cell C The table parameters and cell parameters are the same as in HTML, see http://www.w3.org/TR/html401/struct/tables.html#edef-TABLE and Table (HTML). However, the thead, tbody, tfoot, colgroup, and col elements are currently not supported in MediaWiki, as of April 2017[update]. A table can be useful even if none of the cells have content. For example, the background colors of cells can be changed with cell parameters, making the table into a diagram, like meta:Template talk:Square 8x8 pentomino example. An "image" in the form of a table is much more convenient to edit than an uploaded image. Each row must have the same number of cells as the other rows, so that the number of columns in the table remains consistent. For empty cells, use the non-breaking space &nbsp; as content to ensure that the cells are displayed. With colspan and rowspan cells can span several columns or rows; (See § Mélange, below.) Rendering the pipe[edit] When cell content that contains a pipe character does not render correctly, simply add an empty format for that cell. The second pipe character in a line of |cell code will not display; it is reserved for adding a format. Wikicode between the first and second pipe is a format, but since emptiness or an error there is ignored, it just disappears. When this happens add a dummy format. (For a real format, see § HTML attributes, below.) Use a third pipe character to render your first pipe character. Rendering the first pipe when it is the third pipe in the cell code Code Rendering {| class="wikitable" |- |''formatting''|P|i|p|e| |C|e|l|l|2| |- |''formatting''|P|i|p|e||''formatting''|C|e|l|l|2| |- ||P|i|p|e|s||C|e|l|l|2| |} P|i|p|e| e|l|l|2| P|i|p|e C|e|l|l|2| P|i|p|e|s e|l|l|2| The third and later pipe characters will render, but to display two adjacent pipe characters in a cell, (instead of having them act as the first pipe at the start of a new cell), other pipe-rendering options are needed. Instead of using a dummy format to render a pipe, you can render it directly by 1) <nowiki>|</nowiki> (preferred) or 2) html: &#124; or &#x7C;. Each line of cell code in the following table has one wikicode pipe. Displaying adjacent pipes Code Rendering {| class="wikitable" |- |<nowiki>|</nowiki>Pipes34:<nowiki>||</nowiki> |- |&#124;Pipes34:&#124;&#x7C; |} |Pipes34:|| |Pipes34:|| Template {{!}}, because of the order in which things are parsed, is equivalent to typing in a single | pipe character. The single <nowiki />| parser-tag does not apply here. See how they do not escape the second pipe, as &#124 and <nowiki>|</nowiki> did above: Common mechanisms that do not work in tables Code Rendering {| class="wikitable" |- |<nowiki />|Pipe3:| |- |Pipe2:{{!}}Pipe3:{{!}} |} Pipe3:| Pipe3:|


Examples[edit] Simple straightforward tables[edit] Minimalist table[edit] Both of these generate the same output. Choose a style based on the number of cells in each row and the total text inside each cell. Wiki markup: {| |- | A | B |- | C | D |} {| |- | A || B |- | C || D |} As it appears in a browser (note that there are no borders): A B C D Multiplication table[edit] Note that in this example class="wikitable" is used to style the table with Wikipedia's external style sheet for tables. It adds borders, background shading, and bold header text. Wiki markup: {| class="wikitable" style="text-align: center; width: 200px; height: 200px;" |+ Multiplication table |- ! × ! 1 ! 2 ! 3 |- ! 1 | 1 || 2 || 3 |- ! 2 | 2 || 4 || 6 |- ! 3 | 3 || 6 || 9 |- ! 4 | 4 || 8 || 12 |- ! 5 | 5 || 10 || 15 |} As it appears in a browser: Multiplication table × 1 2 3 1 1 2 3 2 2 4 6 3 3 6 9 4 4 8 12 5 5 10 15 Whole table operations[edit] Captions and summaries[edit] For more details on this topic, see Wikipedia:Manual of Style/Accessibility/Data tables tutorial § Proper table captions and summaries. Explicit table captions are recommended for data tables as a best practice; the Wikipedia Manual of Style considers them a high priority for accessibility reasons, as a caption is explicitly associated with the table, unlike a normal wikitext heading or introductory sentence. A caption is provided with the |+ markup, similar to a table row (|-), 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. A 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 alt description. A summary is added with summary="Summary text here.", on the same line as the {| that opened the table, along with any class= and other parameters for the table as a whole. The summary= attribute is, however, obsolete in HTML5. Wiki markup example 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 |} As it appears in a browser: Data reported for 2014–2015, by region[99] Year Africa Americas Asia & Pacific Europe 2014 2,300 8,950 9,325 4,200 2015 2,725 9,200 8,850 4,775 Width, height[edit] The width and height of the whole table can be specified, as well as the height of a row. To specify the width of a column one can specify the width of an arbitrary cell in it. If the width is not specified for all columns, and/or the height is not specified for all rows, then there is some ambiguity, and the result depends on the browser. Wiki markup: {| class="wikitable" style="width: 60%; height: 14em;" |- | Top-left-cell || Top-center-cell || Top-right-cell |- style="height: 7em;" | Middle-left-cell || style="width: 14em;" | Middle-center-cell || Middle-right-cell |- | Bottom-left-cell || Bottom-center-cell || Bottom-right-cell |} As it appears in a browser: Top-left-cell Top-center-cell Top-right-cell Middle-left-cell Middle-center-cell Middle-right-cell Bottom-left-cell Bottom-center-cell Bottom-right-cell Setting borders[edit] Add a border around a table using the CSS property border: thickness style color;, for example border:3px dashed red. This example uses a solid (non-dashed) gray border that is one pixel wide: Wiki markup: {| style="border-spacing: 2px; border: 1px solid darkgray;" ! style="width: 140px;" | Left ! style="width: 150px;" | Center ! style="width: 130px;" | Right |- | [[File:StarIconBronze.png|120px|Bronze star icon]] | [[File:StarIconGold.png|120px|Gold star icon]] | [[File:StarIconGreen.png|120px|Green star icon]] |- style="text-align: center;" | Bronze star || Gold star || Green star |} Left Center Right Bronze star Gold star Green star Note the bottom-row texts are centered by style="text-align: center;" while the star images are not centered (i.e. left aligned). As long as the File: specs omit the parameter |thumb they don't show the caption lines in the table (only during mouse-over). The border color darkgray matches typical tables or infoboxes in articles; however, it could be any color name (as in style="border: 1px solid darkgreen;") or use a hex-color (such as: #DDCCBB). The same CSS can be used in a cell's format specifier (enclosed in |...|) to put a border around each cell: Wiki markup: {| 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:StarIconBronze.png|120px|Bronze star icon]] | style="border: 1px solid #777777;"| [[File:StarIconGold.png|120px|Gold star icon]] | style="border: 1px solid #22AA55;"|<!--greenish border--> [[File:StarIconGreen.png|120px|Green star icon]] |- style="text-align: center;" |Bronze star || Gold star || Green star |} Left Center Right Bronze star Gold star Green star Note only the image cells, here, have individual borders, not the text. The lower hex-colors (such as: #616161) are closer to black. Typically, all borders in a table would be one specific color. If all cells have the same border color, the resulting double borders may not be wanted; add the border-collapse: collapse; CSS property on the table opening tag to reduce them to single ones (cellspacing=... is obsolete). Additionally, the W3C allows the use of the otherwise obsolete border= attribute on the table root ({|) if its value is "1". This adds a one-pixel border, in the default color, to the table and all of its cells at once: {| border="1" |- | A || B || C |- | D || E || F |} A B C D E F Using the border-collapse property to combine the double borders, as described above: {| border="1" style="border-collapse: collapse;" |- | A || B || C |- | D || E || F |} A B C D E F Positioning[edit] You can position the entire table, the contents of a row, and the contents of a cell, but not with a single parameter for all the contents of the table. See m:Template talk:Table demo. Prior to April 2009, using float to position a table was discouraged; however, it no longer always breaks page rendering at large font sizes. See a floated image, below, under "Floating images in the center". Floating table[edit] Two table classes floatleft and floatright (case sensitive) help floating the table and adjusting table margins so that they do not stick to the text. floatleft floats the table to the left and adjusts right margin. floatright does the opposite. Example: This paragraph is before the table. The text in column 2 spans both rows because of format specifier "rowspan=2" so there is no coding for "Col 2" in the 2nd row, just Col 1 and Col 3. {| class="wikitable floatright" | Col 1, row 1 | rowspan="2" | Col 2, row 1 (and 2) | Col 3, row 1 |- | Col 1, row 2 | Col 3, row 2 |} {| class="wikitable floatleft" | Col 1, row 1 | rowspan="2" | Col 2, row 1 (and 2) | Col 3, row 1 |- | Col 1, row 2 | Col 3, row 2 |} Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. Nemo enim ipsam voluptatem, quia voluptas sit, aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos, qui ratione voluptatem sequi nesciunt, neque porro quisquam est, qui dolorem ipsum, quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt, ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur? As it appears in a browser: This paragraph is before the table. The text in column 2 spans both rows because of format specifier "rowspan=2" so there is no coding for "Col 2" in the 2nd row, just Col 1 and Col 3. Col 1, row 1 Col 2, row 1 (and 2) Col 3, row 1 Col 1, row 2 Col 3, row 2 Col 1, row 1 Col 2, row 1 (and 2) Col 3, row 1 Col 1, row 2 Col 3, row 2 Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. Nemo enim ipsam voluptatem, quia voluptas sit, aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos, qui ratione voluptatem sequi nesciunt, neque porro quisquam est, qui dolorem ipsum, quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt, ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur? Note that although there are other ways to float a table, such as style="float:left;", style="float:right;", the only parameters that allow you to position the table under a floated multimedia object are floatleft and floatright. For example: Aligning the table with floatleft produces: Col 1, row 1 Col 2, row 1 (and 2) Col 3, row 1 Col 1, row 2 Col 3, row 2 Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. Nemo enim ipsam voluptatem, quia voluptas sit, aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos, qui ratione voluptatem sequi nesciunt, neque porro quisquam est, qui dolorem ipsum, quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt, ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur? But aligning it with style="float:left;" produces: Col 1, row 1 Col 2, row 1 (and 2) Col 3, row 1 Col 1, row 2 Col 3, row 2 Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. Nemo enim ipsam voluptatem, quia voluptas sit, aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos, qui ratione voluptatem sequi nesciunt, neque porro quisquam est, qui dolorem ipsum, quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt, ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur? Centering tables[edit] Shortcut HELP:TABLECENTER Centered tables can be achieved, but they don't "float"; that is to say, no text appears to either side. The trick is {| style="margin-left: auto; margin-right: auto; border: none;" [1] Wiki markup: Text before table... {| class="wikitable" style="margin-left: auto; margin-right: auto; border: none;" |+ '''Cells left-aligned, table centered''' ! scope="col" | Duis ! scope="col" | aute ! scope="col" | 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... Cells left-aligned, table centered Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. ...text after table Nested tables[edit] Note: because they cause accessibility issues, nested tables should be avoided whenever possible. Seven different (blue) tables are shown nested inside the cells of a table. Automatically, the two tables |A| and |B|B| are vertically aligned instead of the usual side-by-side of text characters in a cell. And float is used to fix each of tables |C| and |D| to their own position within one cell of the table. This may be used for charts and schematics, though as noted above, this is deprecated. Nested tables must start on a new line. Wiki markup 1 {| style="border: 1px solid black;" 2 | style="border: 1px solid black;" | &alpha; 3 | style="border: 1px solid black; text-align:center;" | cell2 4 {| style="border: 2px solid black; background: #ffffcc;" <!-- The nested table must be on a new line --> 5 | style="border: 2px solid darkgray;" | NESTED 6 |- 7 | style="border: 2px solid darkgray;" | TABLE 8 |} 9 | style="border: 1px solid black; vertical-align: bottom;" | the original table again 10 | style="border: 1px solid black; width:100px" | 11 {| style="border: 2px solid black; background: #ffffcc" 12 | style="border: 2px solid darkgray;" | A 13 |} 14 {| style="border: 2px solid black; background: #ffffcc" 15 | style="border: 2px solid darkgray;" | B 16 | style="border: 2px solid darkgray;" | B 17 |} 18 | style="border: 1px solid black; width: 50px" | 19 {| style="border: 2px solid black; background:#ffffcc; float:left" 20 | style="border: 2px solid darkgray;" | C 21 |} 22 {| style="border: 2px solid black; background:#ffffcc; float:right" 23 | style="border: 2px solid darkgray;" | D 24 |} 25 |} As it appears in a browser: α cell2 NESTED TABLE the original table again A B B C D Scrolling[edit] The whole table can be placed within a scrolling list so that new table lines appear on the screen as old table lines disappear. Although MOS:SCROLL disfavors scrolling tables in article space because article content should be accessible on a variety of devices whereas a scrolling table hides some text, a scrolling table may be used in other Wikipedia namespaces. Wiki markup: <div style="width: 75%; height: 10em; overflow: auto; border: 2px solid red;"> {| class="wikitable" |- | abc || def || ghi |- style="height: 100px;" | jkl || style="width: 200px;" | mno || pqr |- | stu || vwx || yz |} </div> As it appears in a browser: abc def ghi jkl mno pqr stu vwx yz Color; scope of parameters[edit] See also: Wikipedia:Manual of Style/Tables, Wikipedia:Background color, list of colors, Web colors, and Template:Coltit Two ways of specifying color of text and background for a single cell are as follows: Wiki markup: {| |- | style="background: red; color: white;" | abc | def | style="background: red;"| <span style="color: white;"> ghi </span> | jkl |} As it appears in a browser: abc def ghi jkl Like other parameters, colors can also be specified for a whole row or the whole table; parameters for a row override the value for the table, and those for a cell override those for a row. (Note that there is no easy way to specify a color for a whole column—each cell in the column must be individually specified. Tools can make it easier.) Wiki markup: {| style="background: yellow; color: green;" |- | stu || style="background: silver;" | vwx || yz |- style="background: red; color: white" | stu || style="background: silver;" | vwx || yz |- | stu || style="background: silver;" | vwx || yz |} As it appears in a browser: stu vwx yz stu vwx yz stu vwx yz To make the table blend in with the background, use style="background: none;" or style="background: transparent;". (Warning: style="background: inherit;", does not work with some older browsers, including IE6, so ensure that the table will be intelligible if the coloring preference fails.) To force a cell to match one of the default colors of the class="wikitable" template, use style="background: #f2f2f2;" for the darker header, and style="background: #f9f9f9;" for the lighter body. Cell operations[edit] Setting cell parameters[edit] At the start of a cell, add your parameter followed by a single pipe. For example, style="width: 300px"| sets that cell to a width of 300 pixels. To set more than one parameter, leave a space between each one. Wiki markup: {| style="color: white;" |- | style="background: red;"|cell1 || style="width: 300px; background: blue;"|cell2 | style="background: green;"|cell3 |} As it appears in a browser: cell1 cell2 cell3 Vertical alignment in cells[edit] By default, text is aligned to the vertical middle of the cell: Row header A longer piece of text. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Short text Row header Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Imagine someone scrolling down the page, seeing the tops of "empty" columns, and wondering why they're empty. Short text To align the text to the top of the cell, apply the style="vertical-align: top;" CSS to the rows (unfortunately, it seems to be necessary to apply this individually to every single row). The valign=... attribute is obsolete and should not be used. Wiki markup: {| class="wikitable" style="width: 400px;" |- style="vertical-align: top;" ! scope="row" style="width: 10%;" | Row header | style="width: 70%;" | A longer piece of text. Lorem ipsum... | style="width: 20%;" | Short text |- style="vertical-align: top;" ! scope="row" | Row header | Excepteur sint occaecat... | Short text |} Row header A longer piece of text. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Short text Row header Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Imagine someone scrolling down the page, seeing the tops of "empty" columns, and wondering why they're empty. Short text Cell content indenting[edit] The contents of a cell can be indented using a CSS style of padding-left. Wiki markup: {| class="wikitable" |- | Cell content that is not indented || 1 |- | style="padding-left: 2em;" | Indented content || 2 |} Cell content that is not indented 1 Indented content 2 Row operations[edit] Height[edit] (See § Width, height, above.) Border[edit] (See § Setting borders, above.) Alignment[edit] (See § Positioning, above.) Column operations[edit] Setting column widths[edit] To force column widths to specific requirements, rather than accepting the width of the widest text element in a column's cells, follow this example. Note that wrap-around of text is forced. Wiki markup: {| class="wikitable" ! scope="col" style="width: 50px;" | Name ! scope="col" style="width: 225px;" | Effect ! scope="col" style="width: 225px;" | Games found in |- | Poké Ball || Regular Poké Ball || All versions |- | Great Ball || Better than a Poké Ball || All versions |} Name Effect Games found in Poké Ball Regular Poké Ball All versions Great Ball Better than a Poké Ball All versions To set column widths in a table without headers, specify the width in the first cell for each column. Wiki markup: {| class="wikitable" |- | style="width: 100pt;" | This column is 100 points wide | style="width: 200pt;" | This column is 200 points wide | style="width: 300pt;" | This column is 300 points wide |- | blah || blih || bluh |} This column is 100 points wide This column is 200 points wide This column is 300 points wide blah blih bluh You can also use percentages, such as to equalize the widths of a two-column table by setting one of them to style="width: 50%;". One application of setting the widths is aligning columns of consecutive tables. The following are separate tables, with columns set to 350px and 225px. Warning: Setting specific pixel sizes is deprecated, as it interferes with the ability of the browser to adjust content to suit the browser window, device size, user-end font size limits, and other constraints. It is strongly preferred to use relative sizes, in percentage or em values. Country Capital The Netherlands Amsterdam Country Capital France Paris Nowrap[edit] In a table that spans the entire width of a page, cells narrower than the widest cell tend to wrap. To keep an entire column from wrapping, use style="white-space: nowrap;" in a non-header cell on the longest/widest cell to affect the entire column. Without nowrap, as it appears in a browser: Episode Date Summary "The Journey Begins" January 1, 2010 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. "When Episodes Attack" January 8, 2010 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. "So Long" January 15, 2010 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. With nowrap, on both the Episode and Date columns, as it appears in a browser: Episode Date Summary "The Journey Begins" January 1, 2010 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. "When Episodes Attack" January 8, 2010 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. "So Long" January 15, 2010 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Tooltips[edit] You can add tooltips to columns by using the {{H:title}} template. Simply replace the column-title with {{H:title|The tool tip|Column title}}, which makes it appear like so: Column title. More complex examples[edit] Mélange[edit] Note: This example is not accessible, and should be avoided as much as possible. For example, nested tables (tables inside tables) should be separated into distinct tables when possible. Here is a more advanced example, showing some more options available for making up tables. Users can play with these settings in their own table to see what effect they have. Not all of these techniques may be appropriate in all cases; just because colored backgrounds can be added, for example, does not mean it is always a good idea. Try to keep the markup in tables relatively simple—remember, other people are going to be editing the article too! This example should give an idea of what is possible, though. Wiki markup: Text before centered table... {| style="border: 1px solid black; border-spacing: 0; margin: 1em auto;" |+ '''An example table''' |- ! style="border: 1px solid black; padding: 5px; background: #efefef;" | First header ! colspan="2" style="border: 1px solid black; padding: 5px; background: #ffdead;" | Second header |- | style="border: 1px solid black; padding: 5px;" | Upper left | style="border: 1px solid black; padding: 5px;" | Upper middle | rowspan="2" style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px; vertical-align: top;" | Right side |- | style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px;" | Lower left | style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px;" | Lower middle |- | colspan="3" style="border: 1px solid black; text-align: center;" | Text before a nested table... {| |+ ''A table in a table'' |- | style="text-align: center; width: 150px;" | [[File:Wiki.png]] | style="text-align: center; width: 150px;" | [[File:Wiki.png]] |- | colspan="2" style="text-align:center; border-top: 1px solid red;<!-- --> border-right: 1px solid red; border-bottom: 2px solid red;<!-- --> border-left: 1px solid red;" | Two Wikipedia logos |} ...text after a nested table |} ...text after centered table As it appears in a browser: Text before centered table... An example table First header Second header Upper left Upper middle Right side Lower left Lower middle Text before a nested table... A table in a table Two Wikipedia logos ...text after a nested table ...text after centered table Floating images in the center[edit] A table can be used to wrap an image, so that the table can float towards the center of the page (such as using: style="float: right;"). However, the table margins, border and font-size must be precisely set to match a typical image display. The File-spec parameter |thumb (although auto-thumbnailing to user-preference width) forces a wide left-margin that squeezes the nearby text, so the parameter |center can be added to suppress the left-margin padding. However, |center sometimes shoves the caption to a 2nd line (under a centered box "[]"), so |thumb could be omitted and just hard-code the image size, adding a gray (#BBB) border. Using precise parameters to match other images, a floating-image table can be coded as follows: {| style="float: right; border: 1px solid #BBB; margin: .46em 0 0 .2em;" |- style="font-size: 86%;" | style="vertical-align: top;" |[[File:DuraEuropos-TempleOfBel.jpg|180px]]<!-- --><br /> Temple of [[Bel (mythology)|Bel]] (floating). |} The text inside the floating table is sized by style="font-size: 86%;". That floating-image table floats a typical image box, but allows adjusting the left-hand margin of the image (see temple-example floating below). Infobox A This sample infobox shows how the floating image box aligns toward the center.  Temple of Bel (floating). The dashed border around this table shows the implicit margins of Images using "thumb|right". The caption text can be omitted, or remove the parameter "thumb|" so the caption is hidden until "mouse-over display". Unfortunately the parameter |thumb (used for displaying the caption) also controls the auto-thumbnailing to re-size images by user-preferences size. To have auto-thumbnail sizing while also concealing the caption, use |frameless|right instead of |thumb. An image set with parameter |left has a wide right-side margin (opposite margin of parameter |right), so floating toward the left can be achieved with an image set as |center inside a table with style="float:left; margin:0.46em 0.2em;". Recall that, outside an image-table, the parameter |right causes an image to align (either) above or below an infobox, but would not float alongside the infobox. Note the order of precedence: first come infoboxes or images using |right, then come the floating tables, and lastly, any text wraps that can still fit. If the first word of the text is too long, no text will fit to complete the left-hand side, so beware creating a "ragged left margin" when not enough space remains for text to fit alongside floating tables. If multiple single-image tables are stacked, they float to align across the page, depending on page width. The text squeezes to allow as many floating tables as can fit, as auto-aligned, then wrap whatever text can still fit at the left-hand side. ...by float: right ...images wrap... All these... That auto-aligning feature can be used to create a "floating gallery" of images: a set of 20 floating tables wrap (backward, right-to-left), as if each table were a word of text to wrap across and down the page. To wrap in the typical direction (wrapping left-to-right) define all those floating tables, instead, as left-side tables using the top parameter style="float:left; margin:0.46em 0.2em;". Multiple floating images empower more flexible typesetting of images around the text. Combined use of COLSPAN and ROWSPAN[edit] Wiki markup: {| class="wikitable" |- ! Column 1 !! Column 2 !! Column 3 |- | rowspan="2" | A | colspan="2" style="text-align: center;" | B |- | C <!-- column 1 occupied by cell A --> | D |- | E | rowspan="2" colspan="2" style="text-align: center;" |F |- | G <!-- column 2+3 occupied by cell F --> |- | colspan="3" style="text-align: center;" | H |} As it appears in a browser: Column 1 Column 2 Column 3 A B C D E F G H Note that using rowspan="2" for cell G combined with rowspan="3" for cell F to get another row below G and F won't work, because all (implicit) cells would be empty. Likewise complete columns are not displayed if all their cells are empty. Borders between non-empty and empty cells might be also not displayed (depending on the browser), use &nbsp; to fill an empty cell with dummy content. Below is the same table with the order of the declared rows and cells shown in parentheses. The used rowspan and colspan are also shown. Column 1 (row 1 cell 1) Column 2 (row 1 cell 2) Column 3 (row 1 cell 3) A (row 2 cell 1) rowspan="2" B (row 2 cell 2) colspan="2" C (row 3 cell 1) D (row 3 cell 2) E (row 4 cell 1) F (row 4 cell 2) rowspan="2" colspan="2" G (row 5 cell 1) H (row 6 cell 1) colspan="3" Note that 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. Workarounds[edit] Decimal point alignment[edit] Unfortunately, the only way to align columns of numbers at the decimal point is to use two columns, with the first right-justified and the second left-justified. Wiki markup: {| style="border-collapse: collapse;" | style="text-align: right;" | 432 || .1 |- | style="text-align: right;" | 43 || .21 |- | style="text-align: right;" | 4 || .321 |} As it appears in a browser: 432 .1 43 .21 4 .321 If the column of numbers appears in a table with cell padding or cell borders, you can still align the decimal points without an unsightly gap in the middle, by forcing the border and padding between those two columns off. Wiki markup: {| class="wikitable" !colspan=2| Heading |- | style="text-align:right; border-right:none; padding-right:0;" | 432 | style="text-align:left; border-left: none; padding-left: 0;" | .1 |- | style="text-align:right; border-right:none; padding-right:0;" | 43 | style="text-align:left; border-left: none; padding-left: 0;" | .21 |- | style="text-align:right; border-right:none; padding-right:0;" | 4 | style="text-align:left; border-left: none; padding-left: 0;" | .321 |} As it appears in a browser: Heading 432 .1 43 .21 4 .321 Or alternatively the {{decimal cell}} template can be used: {| class="wikitable" !colspan=2 |Heading |- | {{decimal cell|432.1}} |- | {{decimal cell|43.21}} |- | {{decimal cell|4.321}} |} As it appears in a browser: Heading 432 .1 43 .21 4 .321 Using two columns like this does have the disadvantage that searching the web page (either with a browser or a search engine) will usually not be able to find text that straddles the column boundary. Also, if the table has cell spacing (and thus border-collapse=separate), meaning that cells have separate borders with a gap in between, that gap will still be visible. A cruder way to align columns of numbers is to use a figure space &#8199;, which is intended to be the width of a numeral, though is font-dependent in practice: Wiki markup: {| | 432.1 |- | &#8199;43.21 |- | &#8199;&#8199;4.321 |} As it appears in a browser: 432.1  43.21   4.321 As a last resort, when using pre-formatted text, you can dispense with the table feature entirely and simply start the lines with a space, and put spaces to position the numbers—however, there should be a good reason to use pre-formatted text in an article: Wiki markup (just spaces!): 432.1 43.21 4.321 As it appears in a browser: 432.1 43.21 4.321 Non-rectangular tables[edit] An alternative to using {{diagonal split header|HEADER-FOR-ROW-HEADERS|HEADER-FOR-COLUMN-HEADERS}} to diagonally split a header cell, as in the top-left cell below:[2] To From Solid Liquid Gas Solid Solid-solid transformation Melting Sublimation Liquid Freezing — Boiling/evaporation Gas Deposition Condensation — Cell borders can be hidden by adding border: none; background: none; to style attributes of either table or cell (may not work in older browsers). Another use is to implement multi-column aligned tables. Wiki markup: {| class="wikitable" style="border: none; background: none;" ! colspan="2" rowspan="2" style="border: none; background: none;"|[[File:Pfeil_SO.svg|none|link=|20px]] ! colspan="3"| To |- ! Solid !! Liquid !! Gas |- ! rowspan="3"| From ! Solid | Solid-solid transformation || Melting || Sublimation |- ! Liquid | Freezing || {{sdash}} || Boiling/evaporation |- ! Gas | Deposition || Condensation || {{sdash}} |} {| class="wikitable" style="border: none; background: none;" ! Year !! Size !! rowspan="5" style="border: none; background: none;"| ! Year !! Size !! rowspan="5" style="border: none; background: none;"| ! Year !! Size |- | 1990 || 1000<br />(est) || 2000 || 1357 || 2010 || 1776 |- | 1991 || 1010 || 2001 || 1471 || 2011 || 1888 |- | colspan="2" style="text-align: center;"|⋮ | colspan="2" style="text-align: center;"|⋮ | colspan="2" style="text-align: center;"|⋮ |- | 1999 || 1234 || 2009 || 1616 || 2019 || 1997<br />(est) |} Note that the removal of the link on an image is dependent on it being PD. As it appears in a browser: To Solid Liquid Gas From Solid Solid-solid transformation Melting Sublimation Liquid Freezing — Boiling/evaporation Gas Deposition Condensation — Year Size Year Size Year Size 1990 1000 (est) 2000 1357 2010 1776 1991 1010 2001 1471 2011 1888 ⋮ ⋮ ⋮ 1999 1234 2009 1616 2019 1997 (est) Centering tables[edit] (See § Centering tables, above.)


Classes[edit] See also: Help:User style and Help:CSS There are several other CSS classes, besides the basic class="wikitable", documented above. In the first line of table code, after the {|, instead of specifying a style directly, you can also specify a CSS class, which may be used to apply styles. The style for this class can be specified in various ways: in the software itself, per skin (for example the class sortable) collectively for all users of one wiki in MediaWiki:Common.css (for example, on this and some other projects there is or was the class wikitable, later moved to shared.css) separately per skin in MediaWiki:Monobook.css etc. individually on one wiki in a user subpage individually, but jointly for tables of the class concerned on all web pages, on the local computer of the user. Instead of remembering table parameters, you just include an appropriate class after the {|. 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: {| style="border-spacing: 2px;" |+ Multiplication table |- ! scope="col" | &times; ! scope="col" | 1 ! scope="col" | 2 ! scope="col" | 3 |- ! scope="row" | 1 | 1 || 2 || 3 |- ! scope="row" | 2 | 2 || 4 || 6 |- ! scope="row" | 3 | 3 || 6 || 9 |- ! scope="row" | 4 | 4 || 8 || 12 |- ! scope="row" | 5 | 5 || 10 || 15 |} Multiplication table × 1 2 3 1 1 2 3 2 2 4 6 3 3 6 9 4 4 8 12 5 5 10 15 becomes this: {| class="wikitable" |+ Multiplication table |- ! scope="col" | &times; ! scope="col" | 1 ! scope="col" | 2 ! scope="col" | 3 |- ! scope="row" | 1 | 1 || 2 || 3 |- ! scope="row" | 2 | 2 || 4 || 6 |- ! scope="row" | 3 | 3 || 6 || 9 |- ! scope="row" | 4 | 4 || 8 || 12 |- ! scope="row" | 5 | 5 || 10 || 15 |} Multiplication table × 1 2 3 1 1 2 3 2 2 4 6 3 3 6 9 4 4 8 12 5 5 10 15 simply by replacing inline CSS for the table by class="wikitable". This is because the wikitable class in MediaWiki:Common.css contains a number of table.wikitable CSS style rules. These are all applied at once when you mark a table with the class. You can then add additional style rules if desired. These override the class's rules, allowing you to use the class style as a base and build up on it: Wiki markup {| class="wikitable" style="font-style: italic; font-size: 120%; border: 3px dashed red;" |+ Multiplication table |-* ! scope="col" | &times; ! scope="col" | 1 ! scope="col" | 2 ! scope="col" | 3 |- ! scope="row" | 1 | 1 || 2 || 3 |- ! scope="row" | 2 | 2 || 4 || 6 |- ! scope="row" | 3 | 3 || 6 || 9 |- ! scope="row" | 4 | 4 || 8 || 12 |- ! scope="row" | 5 | 5 || 10 || 15 |} As it appears in a browser: Multiplication table × 1 2 3 1 1 2 3 2 2 4 6 3 3 6 9 4 4 8 12 5 5 10 15 Notice that the table retains the gray background of the wikitable class, and the headers are still bold and centered. But now the text formatting has been overridden by the local style= statement; all of the text in the table has been made italic and 120% normal size, and the wikitable border has been replaced by the red dashed border. Collapsible tables[edit] Main page: Help:Collapsing Classes can also be used to collapse tables, so they are hidden by default. Use the class collapsible to enable collapsing behaviour. Collapsible tables can be sortable, too, by also including the sortable class; (See § Sortable tables, above.). By default, a collapsible table begins expanded. To change this, include the additional class collapsed. Alternatively, you can use autocollapse, instead of collapsed, which will automatically collapse the table if three or more collapsible tables are present. As of September 2010[update], you must include a header row, which is where this generated "[hide]" / "[show]" option displays.[clarification needed] Example: {| class="wikitable collapsible autocollapse" |- ! Header |- | Content that starts hidden |- | more hidden content |} Gives: Header Content that starts hidden more hidden content Using class mw-collapsible[edit] See also: more examples Another way is to use class "mw-collapsible". . {| class="wikitable sortable mw-collapsible" Header Content that starts visible more visible content {| class="wikitable sortable mw-collapsible mw-collapsed" Header Content that starts hidden more hidden content Tables with captions[edit] Tables with captions will collapse to the table caption. Use {{nowrap}} to keep the caption from being fit into a tiny vertical column when the table is collapsed. {| class="wikitable sortable mw-collapsible mw-collapsed" |+{{nowrap|Somewhat long table caption}} Somewhat long table caption Header Content that starts visible more visible content Sortable tables[edit] See also: Help:Sorting and meta:Help:Sorting Tables can be made sortable by adding the CSS sortable; for details see Help:Sorting. Since this can be very useful, it is wise to keep the possibilities and limitations of this feature in mind when designing a table. For example: Do not divide a table into sections by subheaders spanning several rows. Instead, an extra column can be made showing the content of these headers on each row, in a short form. In a column of numbers, do not put text such as "ca." or "approx." before or after a number—it will break numerical sorting. Do not put any text or alphabetical characters in any cell of a column to be sorted numerically. Try not to put a range of numbers (it does not affect the sorting position for numeric sorting mode, and in the case of a range, the first number determines the position, but if, possibly after sorting this or another column, the element is at the top, it induces alphabetic sorting mode). Instead, use a "data-sort-value" to override the displayed contents in regards to its sortability for this element. see Help:Sorting#Specifying a sort key for a cell. A long form of abbreviated content can be put as legend outside the table. Wiki markup {| class="wikitable sortable" |+ Sortable table |- ! scope="col" | Alphabetic ! scope="col" | Numeric ! scope="col" | Date ! scope="col" class="unsortable" | Unsortable |- | d || 20 || 2008-11-24 || This |- | b || 8 || 2004-03-01 || column |- | a || 6 || 1979-07-23 || cannot |- | c || 4 || 1492-12-08 || be |- | e || 0 || 1601-08-13 || sorted. |} As it appears in a browser: Sortable table Alphabetic Numeric Date Unsortable d 20 2008-11-24 This b 8 2004-03-01 column a 6 1979-07-23 cannot c 4 1492-12-08 be e 0 1601-08-13 sorted. Numerical and year sorting problems[edit] Main page: Help:Sorting Sorting and collapsing[edit] It is possible to collapse a sortable table. To do so, you need to use the code {| class="wikitable sortable collapsible". Taking the above table and making it collapsible gives you this: Wiki markup {| class="wikitable sortable collapsible" |+ Sortable and collapsible table |- ! scope="col" | Alphabetic ! scope="col" | Numeric ! scope="col" | Date ! scope="col" class="unsortable" | Unsortable |- | d || 20 || 2008-11-24 || This |- | b || 8 || 2004-03-01 || column |- | a || 6 || 1979-07-23 || cannot |- | c || 4.2 || 1492-12-08 || be |- | e || 0 || 1601-08-13 || sorted. |} As it appears in a browser: Sortable and collapsible table Alphabetic Numeric Date Unsortable d 20 2008-11-24 This b 8 2004-03-01 column a 6 1979-07-23 cannot c 4.2 1492-12-08 be e 0 1601-08-13 sorted. If you want the table to default to collapsed state, use the code {| class="wikitable sortable collapsible collapsed" in place of {| class="wikitable sortable collapsible". mw-datatable[edit] The mw-datatable allows for row highlighting by using the class mw-datatable. When a cursor hovers over the table, that row over which the cursor is on will be highlighted. {| class="mw-datatable" |- ! 1 ! 2 ! 3 |- | 1-1 || 2-1 || 3-1 |- | 1-2 || 2-2 || 3-2 |} produces: 1 2 3 1-1 2-1 3-1 1-2 2-2 3-2 It can be used in combination with class wikitable for more similar styling and cell padding, while still allowing hover highlighting of rows. {| class="wikitable mw-datatable" |- ! 1 ! 2 ! 3 |- | 1-1 || 2-1 || 3-1 |- | 1-2 || 2-2 || 3-2 |} produces: 1 2 3 1-1 2-1 3-1 1-2 2-2 3-2


Cells spanning multiple rows or columns[edit] It is possible to create cells that stretch over two or more columns. For this, one uses |colspan=n | content. Similarly, one can create cells that stretch over two or more rows. This requires |rowspan=m | content. In the table code, one must leave out the cells that are covered by such a span. The resulting column- and row-counting must fit. {| 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 |} col1 col2 col3 col4 row1 A C row2 AA BB CC row3 AAA BBB CCC row4 AAAA CCCC In the code, the cell | colspan=2 | A spans two columns. Note that, in the next column, a cell expected to contain "B" does not exist. Similar: in the code, cell | rowspan=2 | BBB spans two rows. A cell expected to contain "BBBB" does not exist.


Section link or map link to a row anchor[edit] To enable a section link's anchor (or a map link's anchor), referencing a specific row within a table, an id="section link anchor name" parameter needs to be added to the row start |- or <tr>: |- id="section link anchor name" <tr id="section link anchor name"> Note that each anchor link anchor name must be different from every other in the page (this includes heading names), to create valid XHTML and allow proper linking. Example of a map link to a row When a country label, containing a link, is clicked on the map, the link coded, for example, as [[#Table row 11|Slovenia]] that references the anchor (within the table), coded as |- id="Table row 11", makes the page scroll so selected row of the table is at the top of the browser view. Here, we use the template family {{Image label begin}}, {{Image label small}}, and {{Image label end}} to lay out such a table for us: Clicking on a country name scrolls the list and shows the country's data on top Andorra ↓ Albania Austria Belarus Belgium B&H Bulgaria Croatia Czech Rep. Denmark Estonia Finland France Germany Greece Hungary Iceland Ireland Italy Latvia Lithuania Luxembourg→ Mac. ←Malta Moldova Mont. Netherlands Norway Poland Portugal Romania Russia Serbia Slovakia Slovenia Spain Sweden  Switz- erland Ukraine United Kingdom          ↦   Countries by percent of Avaaz members per popul.      The list can be scrolled manually or interactively ∨      #   |          Country  |     Popul. | Avaaz |  color coded %           1 Andorra 85,000 3,316   3.90 2 Luxembourg 498,000 14,228   2.86 3 France 64,768,000 1,827,517   2.82 4 Belgium 10,423,000 292,530   2.81 5 Iceland 309,000 7,667 2.48 6 Switzerland 7,623,000 182,814 2.40 7 Malta 407,000 9,129 2.24 8 Austria 8,214,000 167,132 2.03 9 Liechtenstein 36,000 718 1.99 10 Spain 46,506,000 810,680 1.74 11 Slovenia 2,003,000 27,780 1.39 12 Sweden 9,074,000 125,248 1.38 13 Germany 81,644,000 1,082,972 1.33 14 Italy 60,749,000 796,634 1.31 15 Ireland 4,623,000 58,504 1.27 16 United Kingdom 62,348,000 781,025 1.25 17 Portugal 10,736,000 132,219 1.23 18 Netherlands 16,574,000 191,608 1.16 19 Romania 21,959,000 211,867 0.96 20 Norway 4,676,000 36,483 0.78 21 Denmark 5,516,000 41,377 0.75 22 Bulgaria 7,149,000 52,296 0.73 23 Greece 10,750,000 78,874 0.73 24 Latvia 2,218,000 14,967 0.67 25 Estonia 1,291,000 8,535 0.66 26 Croatia 4,487,000 28,950 0.65 27 Lithuania 3,545,000 21,721 0.61 28 Finland 5,255,000 28,836 0.55 29 Hungary 9,992,000 51,684 0.52 30 Poland 38,464,000 162,643 0.42 31 Slovakia 5,470,000 22,588 0.41 32 Czech Republic 10,202,000 39,358 0.39 33 Macedonia 2,072,000 3847 0.19 34 Bosnia and Herz. 4,622,000 8,436 0.18 35 Serbia 7,345,000 12,369 0.17 36 Montenegro 667,000 1,101 0.17 37 Albania 2,987,000 3,300 0.11 38 Moldova 3,732,000 2,134 0.06 39 Russia 139,390,000 62,932 0.05 40 Belarus 9,613,000 2,643 0.03 41 Ukraine 45,416,000 13,002 0.03


Row template[edit] Regardless of whether wikitable format or HTML is used, the wikitext of the rows within a table, and sometimes even within a collection of tables, may have much in common, e.g.: the basic code for a table row code for color, alignment, and sorting mode fixed texts such as units special formats for sorting In such a case, it can be useful to create a template that produces the syntax for a table row, with the data as parameters. This can have many advantages: easily changing the order of columns, or removing a column easily adding a new column if many elements of the new column are left blank (if the column is inserted and the existing fields are unnamed, use a named parameter for the new field to avoid adding blank parameter values to many template calls) computing fields from other fields, e.g. population density from population and area duplicating content and providing span tags with display: none; for the purpose of having one format for sorting and another for display easy specification of a format for a whole column, such as color and alignment Example: Using m:Help:Table/example row template (talk, backlinks, edit) {| class="wikitable sortable" |- ! scope="col" | a ! scope="col" | b ! scope="col" | a/b {{Help:Table/example row template| 50|200}} {{Help:Table/example row template| 8| 11}} {{Help:Table/example row template|1000| 81}} |} gives: a b a/b 50 200 0.25 8 11 0.72727272727273 1000 81 12.345679012346


Conditional table row[edit] Main page: Wikipedia:Conditional tables For a conditional row in a table, we can have: {| class="wikitable" {{ #if:1|{{!}}- ! scope="row" {{!}} row one, column one {{!}}row one, column two}} {{ #if: |{{!}}- ! scope="row" {{!}} row two, column one {{!}}row two, column two}} |- ! scope="row" {{!}} row three, column one | row three, column two |} With comments to explain how it works: {| class="wikitable" <!-- Row one is shown because the '1' evaluates to TRUE. --> {{ #if:1|{{!}}- ! scope="row" {{!}} row one, column one <!-- Any {{!}}'s are evaluated to the pipe character '|' since the template '!' just contains '|'. --> {{!}}row one, column two}} <!-- Row two is NOT shown because the space between the ':' and the '|' evaluates to FALSE. --> {{ #if: |{{!}}- ! scope="row" {{!}} row two, column one {{!}}row two, column two}} <!-- Row three is shown. --> |- ! scope="row" {{!}} row three, column one | row three, column two |} Which gives the following table: (note how the second row is missing) row one, column one row one, column two row three, column one row three, column two


Other table syntax[edit] The types of table syntax that MediaWiki supports are: Wikicode  |  syntax HTML (and XHTML) Mixed XHTML and wikicode (Do not use) All three are supported by MediaWiki and create (currently) valid HTML output, but the pipe syntax is the simplest. Mixed HTML and wikicode  |  syntax (i.e., unclosed  |  and |- tags) don't necessarily remain browser-supported in the future, especially on mobile devices. See also HTML element#Tables. Note, however, that the thead, tbody, tfoot, colgroup, and col elements are currently not supported in MediaWiki, as of July 2015[update]. Comparison of table syntax[edit] XHTML Wiki-pipe Table <table>...</table> {| |} Caption <caption>caption</caption> |+ caption Row <tr>...</tr> |- Data cell <td>cell1</td><td>cell2</td> <td>cell3</td> | cell1 || cell2 || cell3 Header cell <th scope="col">column header</th> <th scope="row">row header</th> ! scope="col" | column header ! scope="row" | row header Sample table 1 2 3 4 <table> <tr> <td>1</td> <td>2</td> </tr> <tr> <td>3</td> <td>4</td> </tr> </table> {| | 1 || 2 |- | 3 || 4 |} Pros Can preview or debug with any XHTML editor Can be indented for easier reading Well-known Insensitive to newlines No characters like "|", which can collide with template and parser function syntax Easy to write Easy to read Takes little space Can be learned quickly Cons Tedious Takes a lot of space Difficult to read quickly Debugging more difficult because of tag pairing requirements Indented code might not match nesting. Confusing newline behaviour as they only occasionally break cells. Unfamiliar syntax for experienced HTML editors Rigid structure Cannot be indented for clarity HTML tag text may be easier to read than pipes, plus signs, dashes, etc. Requires using {{!}} to pass a  |  character in a parameter. Sensitive to newlines; see Help:Newlines and spaces. XHTML Wiki-pipe


Pipe syntax in terms of the HTML produced[edit] The pipe syntax, developed by Magnus Manske, substitutes pipes ( | ) and other symbols for HTML. There is an online script, which converts HTML tables to pipe-syntax tables. The pipes must start at the beginning of a new line, except when separating parameters from content or when using || to separate cells on a single line. The parameters are optional. Tables[edit] A table is defined by {| parameters |}, which generates <table params>...</table>. Rows[edit] For each table, an HTML <tr> tag is generated for the first row. To start a new row, use: |- which generates another <tr>. Parameters can be added like this: |- params which generates <tr params>. Note: <tr> tags are automatically opened before the first <td> equivalent <tr> tags are automatically closed at another <tr> equivalent and at the </table> equivalent Cells[edit] Cells are generated either like this: |cell1 |cell2 |cell3 or like this: |cell1||cell2||cell3 which both generate: <td>cell1</td><td>cell2</td><td>cell3</td>. The || equals a newline +  | . Parameters in cells can be used like this: |params|cell1||params|cell2||params|cell3 which results in: <td params>cell1</td> <td params>cell2</td> <td params>cell3</td> Headers[edit] The code used produces a <th>...</th>, functioning the same way as <td>...</td>, but with different style and semantic meaning. A  !  character is used instead of the opening  | , and !! can be used like ||, to enter multiple headers on the same line. Parameters still use "|", though. Example: !params|cell1 Captions[edit] A <caption> tag is created by caption which generates the HTML <caption>caption</caption>. You can also use parameters: caption which generates <caption params>caption</caption>.


Table cell templates[edit] {{Table cell templates}} provide a set of templates to configure text and color in cells in a standard way, producing stock output such as "Yes", "No", and "n/a", on coloured backgrounds.


Vertically oriented column headers[edit] Sometimes it is desirable (such as in a table predominantly made of numbers) to rotate text such that it proceeds from top to bottom or bottom to top instead of from left to right or right to left. Formerly, browser support for this type of styling as a component of HTML or CSS was sporadic (Internet Explorer was one of the few browsers that supports this in cascading stylesheets, albeit in a non-standard way). Rotated column headers using {{vert header}} Date/Page VG: Project VG: Talk VG: Portal VG: Article guidelines VG: Templates VG: Sources VG: Assessment VG: Cleanup VG Requests 05/08 4266 7828 7282 1105 224 161 916 506 231 04/08 4127 6190 6487 1139 241 205 1165 478 301 An alternative solution that works in most if not all browsers is to use images in place of the text. For instance, the following table uses SVG images instead of text to produce the rotated column headers: Rotated column headers using images 05/08 4266 7828 7282 1105 224 161 916 506 231 04/08 4127 6190 6487 1139 241 205 1165 478 301 Normally, one problem with this approach is that readers are directed to different pages when they click on the images. To eliminate this problem—or to direct readers to a different page—you can use the |link= parameter of the File: specification. A column header can be coded as follows: ! [[File:wpvg vg project.svg |alt=VG: Project |link='''Wikipedia:WikiProject Video games''']] The image wikilinks to the page Wikipedia:WikiProject Video games. By setting the link to an empty string (e.g. [[File:wpvg hd date page.svg |link=]]), no navigation occurs when visitors click on an image. Note that it might also be a good idea to color the image text blue if you are using the images as links. Also, SVG is the preferred image format in this case because it can be re-scaled to any size while producing fewer artifacts. A more serious potential problem is that the "rotated text" is not text that can be used by screen readers and other technologies for visually disabled users. So those users wouldn't be able to "read" the column headers. Also, automated search engine Web crawlers would not be able to read it either. This is solved by always using the |alt= parameter in the File: specification of each image to provide the same text as in the rotated image; see |alt=VG: Project in the example above.


Wikitable as image gallery[edit] This section is still recommending deprecated fixed-pixel sizes for images, and should be updated with relative sizes in em units. A wikitable can be used to display side-by-side images, in the manner similar to that of an image gallery (formatted by <gallery>...</gallery>), but with larger images and less vacant area around photos. A simple, framed gallery can be formatted using class="wikitable" to generate the minimal thin lines around images within the table: {| class="wikitable" |- |<!--col1-->[[File:Worms 01.jpg|130px]] |<!--col2-->[[File:Worms Wappen 2005-05-27.jpg|125px]] |<!--col3-->[[File:Liberty-statue-with-manhattan.jpg|125px]] |<!--col4-->[[File:New-York-Jan2005.jpg|125px]] |- |<!--col1-->Nibelungen Bridge to Worms |<!--col2-->Worms and its sister cities |<!--col3-->Statue of Liberty |<!--col4-->New York City |}<!--end wikitable--> Nibelungen Bridge to Worms Worms and its sister cities Statue of Liberty New York City An advantage of wikitable image galleries, compared to <gallery> formatting, is the ability to "square" each image when similar heights are needed, so consider putting two-number image sizes (such as 199x95px), where the second number limits height: {| class="wikitable" |<!--col1-->[[File:Worms 01.jpg|199x95px]] |<!--col2-->[[File:Worms Wappen 2005-05-27.jpg|199x95px]] |<!--col3-->[[File:Liberty-statue-with-manhattan.jpg|199x95px]] |<!--col4-->[[File:New-York-Jan2005.jpg|100x95px]]<!--smaller--> |- |<!--col1-->Nibelungen Bridge to Worms |<!--col2-->Worms and its sister cities |<!--col3-->Statue of Liberty |<!--col4-->New York City |} Note the three images sized 199x95px appear identical height, of 95px (the fourth image purposely smaller). The "95px" forces height, while 199x fits the various widths (it could even be 999x): Nibelungen Bridge to Worms Worms and its sister cities Statue of Liberty New York City Therefore, the use of size 199x95px (or 999x95px, or whatever) produces the auto-height-sizing beyond the <gallery> tag, and with the option to set taller thumbnails (199x105px), or even to have some images purposely smaller than other images of 95px height. A very short height (e.g. 70px) allows many more images across the table: {| class="wikitable" |- |<!--col1-->[[File:Worms 01.jpg|199x70px]] |<!--col2-->[[File:Gold star on blue.gif|199x70px]] |<!--col3-->[[File:Worms Wappen 2005-05-27.jpg|199x70px]] |<!--col4-->[[File:Gold star on deep red.gif|199x70px]] |<!--col5-->[[File:Liberty-statue-with-manhattan.jpg|199x70px]] |<!--col6-->[[File:Gold star on blue.gif|199x70px]] |<!--col7-->[[File:New-York-Jan2005.jpg|199x70px]]<!--same height--> |- |} The above wikitable-coding produces the result below, of 7 columns: Once images have been placed in a wikitable, control of formatting can be adjusted when more images are added. Shifting/centering[edit] Images within a wikitable can be shifted by inserting non-breaking spaces (&nbsp;) before or after the image code (e.g., &nbsp;[[Image:...]]). However, auto-centering simply requires use of the |center parameter (see WP:Extended image syntax#Location). In the example below, note how Col2 uses |center, but Col3 uses &nbsp;: {| class="wikitable" |- |<!--Col1-->[[File:Domtoren vanaf Brigittenstraat.jpg|299x125px]] |<!--Col2-->[[File:Utrecht 003.jpg|299x125px|center]] |<!--Col3-->&nbsp;[[File:Uitzicht--Domtoren.jpg|299x125px]]&nbsp; |- |<!--Col1-->Dom tower from Brigittenstraat |<!--Col2-->Cloister garth of the Utrecht Dom Church |<!--Col3-->&nbsp;&nbsp;<small>View from bell tower</small> |} The above coding generates the table below: note the middle garden image is centered (but not the left image), and the right image has 2 spaces before "View...", to give an approximation of centering:    Dom tower from Brigittenstraat Cloister garth of the Utrecht Dom Church   View from bell tower Also note that the tag <small>...</small> made a smaller-text-size caption. Fonts also can be sized by percent (style="font-size: 87%;"), where the exact percent-size as displayed depends on the various sizes allowed for a particular font; the browser will approximate to the nearest possible size. | style="font-size: 87%;" | View from bell tower The column attribute, above, uses style= to set the font size for the caption, following the second pipe symbol. A font-size: 65%; is excessively small, while font-size: 87%; is a mid-size font, slightly larger than that produced by the tag <small>.


Converting spreadsheets and database tables to wikitable format[edit] To convert from spreadsheets (such as those produced by Gnumeric, Microsoft Excel, or LibreOffice/OpenOffice.org/StarOffice Calc), you can use the Copy & Paste Excel-to-Wiki converter, or the MediaWiki Tables Generator. The online csv2wp script (documentation) converts comma-separated values (CSV) format to wikitable pipe syntax. You may use this to import tables from both spreadsheets and databases (such as MySQL, PostgreSQL, SQLite, FileMaker, Microsoft SQL Server & Access, Oracle, DB2, etc.).


Indenting tables[edit] To indent an entire table, use one or more colons (":", the normal indent code), immediately before the table: :{| class="wikitable" |- ! Header 1 ! Header 2 |- | row 1, cell 1 | row 1, cell 2 |- | row 2, cell 1 | row 2, cell 2 |} which gives this result: Header 1 Header 2 row 1, cell 1 row 1, cell 2 row 2, cell 1 row 2, cell 2 This should not normally be used, but in certain specific cases where surrounding paragraphs are also indented using ":", it can be useful.


Tables and the Visual Editor[edit] It is now possible to copy and paste a table from a web page directly into the Visual Editor (VE). To do so safely, use a sandbox and check the table for proper coding in wikitext source mode and proper display in the Visual Editor and in preview mode. One of the most useful features is the ability to add and delete columns and rows within the VE; while edting, left-click on the left of a row, or the top of a column to see the options.


See also[edit] Help:Introduction to tables with Wiki Markup: an introduction to tables. Help:Basic table markup: the fundamentals of table wiki markup. Help:Sorting: information about sortable tables. Wikipedia:Advanced table formatting: advanced topics. Wikipedia:Manual of Style/Tables: the Manual of Style indicates best practices for tables. Wikipedia:Table dos and don'ts: a quick guide to the Manual of Style for tables. User:Dcljr/Tables: table tutorials. Table (HTML): tags used for HTML tables. {{List to table}} template and its maintenance category: Category:Articles requiring tables Template:Horizontal TOC: good for country lists in table format. Category:Table templates: all the templates that use tables. Category:Multi-column templates: templates for using columns without tables. {{Table}}: template for specifying table CSS classes such as "wikitable" and "collapsible" {{Aligned table}}: for specifying tables as a template, allowing inclusion in other templates and areas where table syntax is problematic Examples: Chess board template Go board template Wikimedia sister projects[edit] Editing Wikitext/Tables at Wikibooks Editing Wikitext/Tables Ready to Use at Wikibooks mw:Help:Tables: MediaWiki help page on tables. m:Wiki markup tables: Meta-Wiki information on tables. m:Help:Sorting: Meta-Wiki information on sortable tables. m:Table background colors: MediaWiki background colors table. Commons:Chart and graph resources: Chart and graph resources at Commons Commons:Convert tables and charts to wiki code or image files: includes information on converting table markup.


Notes[edit] ^ border: none; avoids an unsightly empty column in tables narrower than the browser window on Android Chrome. ^ A simplified version of Template:Table_of_phase_transitions


External links[edit] VBA-Macro for EXCEL tableconversion, published in German-Wikipediaproject (English translation included) Online table builder with mediawiki export HTML tables to wiki converter at WMF Labs Copy & Paste Excel-to-Wiki converter at WMF Labs Wikitable Editor, a visual table editor in wiki code HTML-WikiConverter, various versions and languages pywikipediabot, can convert HTML tables to wiki Table of CSS color names and HEX codes Bugzilla request for floating table headers v t e Wikipedia help pages Visit the Teahouse if you are a new editor looking for interactive help, or the Help desk for an interactive Q & A forum. FAQs (?) Reference desks (?) Noticeboards (?) Missing Manual (?) Cheatsheet (?) Directories (?) About Wikipedia Administration Purpose Principles Wikipedia in brief Policies and guidelines What Wikipedia is not Disclaimer (parental advice) Making requests where to ask questions contact Wikipedia directly Who writes Wikipedia? Why create an account? Help for readers FAQ Books Copyright Glossary Mobile access Navigation Other languages Searching Students Viewing media Contributing to Wikipedia A plain and simple overview A primer for newcomers Advice for young editors Avoiding common mistakes Etiquette (community expectations) Learning the ropes Instructional material Simplified Manual of Style Simplified rule-set "Ignore all rules" "The rules are principles" Style-tips Tip of the day Task Center Your first article (article wizard) Vandalism Getting started Wikipedia intro Wikipedia tutorial The Wikipedia Adventure Manual of Style intro Graphics tutorials Picture tutorial (Uploading intro) IRC (live chat) tutorial Navigating intro Policies intro Referencing intro Tables intro Talk pages intro VisualEditor user guide Dos and don'ts Accessibility Bio's Categorization Disambiguation Images Links Lists References Tables Talks How-to pages and information pages Appealing blocks Article deletion Categories Citations / references Referencing for beginners Citation Style 1 Cite errors References and page numbers Convert Diff Editing toolbar edit conflict Email confirmation Find sources Files Footnotes Image deletion Infoboxes Linking (link color) Logging in Merging Namespaces Page name Redirect Renaming pages Passwords Reverting Talk pages (archiving) URL User contributions User page design center Coding wiki markup Wiki markup Barcharts Calculations Characters Citation templates Columns Hidden text HTML Lists Magic words (introduction) Music symbols Sections Sounds Tables (introduction) Templates documentation messages cleanup messages Transclusion Visual files Wiki tools Directories Abbreviations Departments Editor's index Essays FAQs Glossary Guidelines Help menu Manual of Style Policies Shortcuts Tasks Tips Ask for help on your talk page v t e Wikipedia technical help Get personal technical help at the Teahouse, Help desk, Village pump (technical), talk pages or IRC. General technical help Editing Edit toolbar CharInsert Edit conflict Reverting VisualEditor User guide Create a page Page history Page information Page name Introduction Browser notes Keyboard shortcuts Troubleshooting Bypass cache Mobile access Multilingual support Special Characters Entering Printing User access levels Software notices Editnotice IRC Tutorial Special page related Special page help Searching Advanced search Linksearch Logging in Reset passwords Notifications/Echo FAQ Moving a page Fixing cut-and-paste moves Watching pages User contributions Emailing users Random pages Logs What links here Related changes Recent changes Pending changes Page Curation Page import Edit filter Tags Wikitext Wikitext main page Cheatsheet Colours use Columns Line-break handling Lists Magic words For beginners Conditional expressions Switch parser function Time function Redirects Sections and TOCs Tables Introduction Basics Conditional tables Sorting Collapsing Advanced table formatting Links and diffs URLs Links Permanent link Interwikimedia links Interlanguage links Link color Pipe trick Colon trick Magic links Diffs Simplest diff guide Simple diff and link guide Complete diff and link guide Media files: images, videos and sounds Media help Options to hide an image Uploading images Introduction Files Creation and usage Moving files to Commons Visual file markup Images Preparing images for upload Picture tutorial Extended image syntax Gallery tag Graphics tutorials Basic bitmap image editing How to improve image quality Graphics Lab resources Sound file markup SVG help Other graphics Family trees Graphs and charts How to create To scale charts Barcharts Math formula Math symbols Rendering math LaTeX symbols Musical scores Musical symbols Timeline EasyTimeline syntax WikiHiero syntax Templates and Lua modules Templates Template messages Citation templates Transclusion Labeled section Substitution Advanced template coding Template limits Template sandbox and test cases Template documentation Purge Job queue Lua help Lua project To do Resources Guide to Scribbling Data structure Namespaces Main/Article Talk namespaces Archiving User User page design Project/Wikipedia File File description page MediaWiki Bug reports and feature requests System message Template Help Category Portal Book Draft Education Program TimedText Module/Lua Topic/Flow Special Media HTML and CSS HTML in wikitext Markup validation Span tags Cascading Style Sheets Catalogue of CSS classes Useful styles Classes used in microformats Ambox classes Common.js and common.css User CSS for monospaced coding font Customisation and tools Preferences Skins Customizing watchlists Hide pages Gadgets Beta Features User scripts Guide Techniques IRC Scripts User styles Tools Navigation shortcuts Browser tools Alternative browsing Editing tools Optimum tool set Cleaning up vandalism tools Citation tools Wikimedia Cloud Services Automating editing Bots Creating Twinkle HotCat WPCleaner igloo AutoWikiBrowser Navigation popups STiki AfC helper script Huggle See also: Category:Wikipedia information pages Category:Wikipedia how-to Further navigation at: Help pages Administrators Templates Referencing Citation metadata Accessibility Bots User scripts Accounts Retrieved from "https://en.wikipedia.org/w/index.php?title=Help:Table&oldid=820246853" Categories: Wikipedia how-toWikipedia text helpWikipedia tables


Navigation menu Personal tools Not logged inTalkContributionsCreate accountLog in Namespaces Help pageTalk Variants Views ReadEditView history More Search Navigation Main pageContentsFeatured contentCurrent eventsRandom articleDonate to WikipediaWikipedia store Interaction HelpAbout WikipediaCommunity portalRecent changesContact page Tools What links hereRelated changesUpload fileSpecial pagesPermanent linkPage informationWikidata item Print/export Create a bookDownload as PDFPrintable version In other projects MediaWikiMeta-WikiWikibooksWikisource Languages AfrikaansالعربيةБългарскиBosanskiBrezhonegCatalàČeštinaDanskDeutschDolnoserbskiEestiΕλληνικάEspañolEsperantoEuskaraفارسیFrançaisGalego한국어ՀայերենHornjoserbsceBahasa IndonesiaItalianoעבריתBasa JawaქართულიKiswahiliKurdîLëtzebuergeschLietuviųMagyarМакедонскиമലയാളംМонголမြန်မာဘာသာNederlands日本語NapulitanoNorskNorsk nynorskភាសាខ្មែរPolskiPortuguêsRomânăRuna SimiРусскийSesotho sa LeboaShqipසිංහලSimple EnglishSlovenčinaSlovenščinaСрпски / srpskiSuomiSvenskaதமிழ்TaqbaylitТатарча/tatarçaไทยTürkçeУкраїнськаTiếng Việt中文 Edit links This page was last edited on 13 January 2018, at 21:51. Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization. Privacy policy About Wikipedia Disclaimers Contact Wikipedia Developers Cookie statement Mobile view (window.RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgPageParseReport":{"limitreport":{"cputime":"0.628","walltime":"0.803","ppvisitednodes":{"value":10558,"limit":1000000},"ppgeneratednodes":{"value":0,"limit":1500000},"postexpandincludesize":{"value":166160,"limit":2097152},"templateargumentsize":{"value":15767,"limit":2097152},"expansiondepth":{"value":15,"limit":40},"expensivefunctioncount":{"value":2,"limit":500},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 482.813 1 -total"," 9.73% 46.982 1 Template:Wikipedia_how_to"," 7.89% 38.110 2 Template:Navbox"," 7.86% 37.928 1 Template:Ombox"," 7.25% 35.010 1 Template:Help_navigation"," 5.95% 28.706 35 Template:Tag"," 5.89% 28.460 7 Template:Crossreference"," 5.69% 27.457 8 Template:Hatnote_inline"," 5.45% 26.332 1 Template:Clarify"," 5.42% 26.151 3 Template:As_of"]},"scribunto":{"limitreport-timeusage":{"value":"0.111","limit":"10.000"},"limitreport-memusage":{"value":4409314,"limit":52428800}},"cachereport":{"origin":"mw1270","timestamp":"20180117173352","ttl":1900800,"transientcontent":false}}});});(window.RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgBackendResponseTime":93,"wgHostname":"mw1262"});});


Help:Table - Photos and All Basic Informations

Help:Table More Links

Help:Table/Introduction To TablesWikipedia:Manual Of Style/TablesWikipedia:Manual Of Style/Accessibility/Data Tables TutorialWikipedia:Project NamespaceWikipedia:Policies And GuidelinesWikipedia:ConsensusWikipedia:ShortcutWikitextHelp:CheatsheetHelp:WikitextHelp:Magic LinksHelp:Visual File MarkupHelp:Sound File MarkupHelp:A Quick Guide To TemplatesHelp:HTML In WikitextTemplate:Wikitext NavboxTemplate Talk:Wikitext NavboxTable (information)WikitextHelp:ListHelp:Edit ToolbarHelp:Basic Table MarkupHTML AttributeHTML AttributeCSSPixel DensityEm (typography)Help:Table/HTML And TablesWikicodeVertical BarHTML TableRow (database)HyphenTable CellWikipedia:Manual Of Style/Accessibility/Data Tables TutorialCSSMediaWiki:Common.cssHTMLTable (HTML)Help:HTML In WikitextVertical BarHtmlTemplate:!Help:NowikiEscape CharacterWikipedia:Manual Of Style/Accessibility/Data Tables TutorialWikipedia:Manual Of Style/Accessibility/Data Tables TutorialWikipedia:HTML5Bronze Star IconGold Star IconGreen Star IconHex TripletBronze Star IconGold Star IconGreen Star IconWikipedia:HTML5W3CEdit Section: Centering TablesWikipedia:ShortcutWikipedia:Manual Of Style (accessibility)Help:Scrolling ListMOS:SCROLLWikipedia:Article SpaceWikipedia:NamespaceWikipedia:Manual Of Style/TablesWikipedia:Background ColorList Of Colors (compact)Web ColorsTemplate:ColtitHelp:Using ColoursHelp:User StyleWikipedia:HTML5Word WrapLorem IpsumTemplate:H:titleMOS:ACCESSEdit Section: Floating Images In The CenterBel (mythology)EnlargeEdit Section: Combined Use Of COLSPAN And ROWSPANTemplate:Decimal CellFigure SpaceWikipedia:EISHelp:User StyleHelp:CSSCascading Style SheetsMediaWiki:Common.cssMediaWiki:Monobook.cssMediaWiki:Common.cssHelp:CollapsingWikipedia:Please ClarifyTemplate:NowrapHelp:SortingCascading Style SheetsHelp:SortingHelp:SortingHelp:SortingHelp:LinkHTML ElementWikipedia:Blank MapsTemplate:Image Label BeginTemplate:Image Label SmallTemplate:Image Label EndAvaazHelp:SortingWikipedia:Conditional TablesHTML ElementHelp:HTML In WikitextTemplate:!Help:Newlines And SpacesTable (HTML)Semantic HTMLTemplate:Table Cell TemplatesTemplate:Vert HeaderWikipedia:WikiProject Video GamesWikipedia Talk:WikiProject Video GamesPortal:Video GamesWikipedia:WikiProject Video Games/Article GuidelinesWikipedia:WikiProject Video Games/TemplatesWikipedia:WikiProject Video Games/SourcesWikipedia:WikiProject Video Games/AssessmentWikipedia:WikiProject Video Games/CleanupWikipedia:WikiProject Video Games/RequestsWikipedia:WikiProject Video GamesWikipedia Talk:WikiProject Video GamesPortal:Video GamesWikipedia:WikiProject Video Games/Article GuidelinesWikipedia:WikiProject Video Games/TemplatesWikipedia:WikiProject Video Games/SourcesWikipedia:WikiProject Video Games/AssessmentWikipedia:WikiProject Video Games/CleanupWikipedia:WikiProject Video Games/RequestsWikipedia:WikiProject Video GamesScreen ReaderWeb CrawlerEdit Section: Shifting/centeringWikipedia:Extended Image SyntaxEdit Section: Converting Spreadsheets And Database Tables To Wikitable FormatSpreadsheetGnumericMicrosoft ExcelLibreOfficeOpenOffice.orgStarOfficeComma-separated ValuesDatabaseMySQLPostgreSQLSQLiteFileMakerMicrosoft SQL ServerMicrosoft AccessOracle DatabaseIBM Db2Help:WikitextWikipedia:Visual EditorHelp:Introduction To Tables With Wiki MarkupHelp:Basic Table MarkupHelp:SortingWikipedia:Advanced Table FormattingWikipedia:Manual Of Style/TablesWikipedia:Table Dos And Don'tsUser:Dcljr/TablesTable (HTML)Template:List To TableCategory:Articles Requiring TablesTemplate:Horizontal TOCCategory:Table TemplatesCategory:Multi-column TemplatesTemplate:TableTemplate:Aligned TableTemplate:Chess DiagramTemplate:GobanWikibooks:Editing Wikitext/TablesWikibooks:Editing Wikitext/Tables Ready To UseTemplate:Table Of Phase TransitionsTemplate:Wikipedia Help PagesTemplate Talk:Wikipedia Help PagesHelp:DirectoryWikipedia:TeahouseWikipedia:Help DeskWikipedia:FAQWikipedia:Reference DeskWikipedia:NoticeboardsHelp:Wikipedia: The Missing ManualHelp:CheatsheetWikipedia:Directories And IndexesWikipedia:AboutWikipedia:AdministrationWikipedia:PurposeWikipedia:Five PillarsWikipedia:Wikipedia In BriefWikipedia:Policies And GuidelinesWikipedia:What Wikipedia Is NotWikipedia:General DisclaimerWikipedia:Advice For ParentsWikipedia:Request DirectoryWikipedia:QuestionsWikipedia:Contact UsWikipedia:Who Writes Wikipedia?Wikipedia:Why Create An Account?Wikipedia:Reader's Index To WikipediaWikipedia:FAQ/ReadersHelp:BooksHelp:CopyrightHelp:GlossaryHelp:Mobile AccessHelp:NavigationHelp:Other LanguagesHelp:SearchingHelp:Student HelpHelp:Viewing MediaWikipedia:Contributing To WikipediaWikipedia:Plain And SimpleWikipedia:A Primer For NewcomersWikipedia:Guidance For Younger EditorsWikipedia:Avoiding Common MistakesWikipedia:EtiquetteWikipedia:Expectations And Norms Of The Wikipedia CommunityWikipedia:Learning The RopesWikipedia:Instructional MaterialWikipedia:Simplified Manual Of StyleWikipedia:Simplified RulesetWikipedia:Ignore All RulesWikipedia:The Rules Are PrinciplesWikipedia:StyletipsWikipedia:Tip Of The DayWikipedia:Task CenterWikipedia:Your First ArticleWikipedia:Article WizardWikipedia:VandalismHelp:Getting StartedWikipedia:IntroductionWikipedia:TutorialWikipedia:The Wikipedia AdventureHelp:Introduction To The Manual Of Style/1Wikipedia:Graphics TutorialsWikipedia:Picture TutorialHelp:Introduction To Images With Wiki Markup/1Wikipedia:IRC/TutorialHelp:Introduction To Navigating Wikipedia/1Help:Introduction To Policies And Guidelines/1Help:Introduction To Referencing With Wiki Markup/1Help:Introduction To Tables With Wiki Markup/1Help:Introduction To Talk Pages/1Wikipedia:VisualEditor/User GuideWikipedia:Dos And Don'tsWikipedia:Accessibility Dos And Don'tsWikipedia:Biography Dos And Don'tsWikipedia:Categorization Dos And Don'tsWikipedia:Disambiguation Dos And Don'tsWikipedia:Image Dos And Don'tsWikipedia:Linking Dos And Don'tsWikipedia:List Dos And Don'tsWikipedia:References Dos And Don'tsWikipedia:Table Dos And Don'tsWikipedia:Talk Dos And Don'tsCategory:Wikipedia How-toCategory:Wikipedia Information PagesWikipedia:Guide To Appealing BlocksWikipedia:Guide To DeletionHelp:CategoryHelp:Citations Quick ReferenceHelp:Referencing For BeginnersHelp:Citation Style 1Help:Cite ErrorsHelp:References And Page NumbersHelp:ConvertHelp:DiffHelp:EditingHelp:Edit ToolbarHelp:Edit ConflictHelp:Email ConfirmationHelp:Find SourcesHelp:FilesHelp:FootnotesWikipedia:Guide To Image DeletionHelp:InfoboxHelp:LinkHelp:Link ColorHelp:Logging InWikipedia:MergingWikipedia:NamespaceHelp:Page NameHelp:RedirectHelp:How To Move A PageHelp:Reset PasswordHelp:RevertingHelp:Using Talk PagesHelp:Archiving A Talk PageHelp:URLHelp:User ContributionsWikipedia:User Page Design CenterWiki MarkupHelp:Wiki MarkupHelp:BarchartHelp:CalculationHelp:Special CharactersWikipedia:Citation TemplatesHelp:ColumnsWikipedia:Manual Of Style/Hidden TextHelp:HTML In WikitextHelp:ListHelp:Magic WordsHelp:Magic Words For BeginnersHelp:Musical SymbolsHelp:SectionHelp:Sound File MarkupHelp:Introduction To Tables With Wiki Markup/1Help:TemplateWikipedia:Template DocumentationWikipedia:Template MessagesWikipedia:Template Messages/CleanupWikipedia:TransclusionHelp:Visual File MarkupWikipedia:ToolsWikipedia:Directories And IndexesWikipedia:Wikipedia AbbreviationsWikipedia:Department DirectoryWikipedia:Editor's Index To WikipediaWikipedia:Essay DirectoryWikipedia:FAQ/IndexWikipedia:GlossaryWikipedia:List Of GuidelinesHelp:MenuWikipedia:Manual Of Style/ContentsWikipedia:List Of PoliciesWikipedia:Shortcut DirectoryWikipedia:MaintenanceWikipedia:TipsTemplate:Wikipedia Technical HelpTemplate Talk:Wikipedia Technical HelpHelp:DirectoryWikipedia:TeahouseWikipedia:Help DeskWikipedia:Village Pump (technical)Help:Introduction To Talk Pages/1Wikipedia:IRCWikipedia:FAQ/TechnicalHelp:EditingHelp:Edit ToolbarHelp:CharInsertHelp:Edit ConflictHelp:RevertingWikipedia:VisualEditorWikipedia:VisualEditor/User GuideWikipedia:How To Create A PageHelp:Page HistoryHelp:Page InformationWikipedia:Page NameHelp:Page NameWikipedia:Browser NotesWikipedia:Keyboard ShortcutsWikipedia:TroubleshootingWikipedia:Bypass Your CacheHelp:Mobile AccessHelp:Multilingual SupportHelp:Special CharactersHelp:Entering Special CharactersHelp:PrintingWikipedia:User Access LevelsWikipedia:Software NoticesWikipedia:EditnoticeWikipedia:IRCWikipedia:IRC/TutorialSpecial:SpecialPagesHelp:Special PageHelp:SearchingHelp:Advanced SearchHelp:LinksearchHelp:Logging InHelp:Reset PasswordWikipedia:NotificationsWikipedia:Notifications/FAQWikipedia:Moving A PageWikipedia:Administrators' Guide/Fixing Cut-and-paste MovesHelp:WatchlistHelp:User ContributionsWikipedia:Emailing UsersWikipedia:RandomHelp:LogHelp:What Links HereHelp:Related ChangesHelp:Recent ChangesWikipedia:Pending ChangesWikipedia:Page CurationHelp:ImportWikipedia:Edit FilterWikipedia:TagsWikitextHelp:WikitextHelp:CheatsheetHelp:Using ColoursHelp:ColumnsWikipedia:Line-break HandlingHelp:ListHelp:Magic WordsHelp:Magic Words For BeginnersHelp:Conditional ExpressionsHelp:Switch Parser FunctionHelp:Time FunctionHelp:RedirectHelp:SectionHelp:Introduction To Tables With Wiki Markup/1Help:Basic Table MarkupHelp:Conditional TablesHelp:SortingHelp:CollapsingWikipedia:Advanced Table FormattingHyperlinkData ComparisonHelp:URLHelp:LinkHelp:Permanent LinkHelp:Interwikimedia LinksHelp:Interlanguage LinksHelp:Link ColorHelp:Pipe TrickHelp:Colon TrickHelp:Magic LinksHelp:DiffWikipedia:Simplest Diff GuideWikipedia:Simple Diff And Link GuideWikipedia:Complete Diff And Link GuideWikipedia:Media HelpHelp:Options To Hide An ImageWikipedia:Uploading ImagesHelp:Introduction To Images With Wiki Markup/1Help:FilesWikipedia:Creation And Usage Of Media FilesWikipedia:Moving Files To CommonsHelp:Visual File MarkupWikipedia:ImagesWikipedia:Preparing Images For UploadWikipedia:Picture TutorialWikipedia:Extended Image SyntaxHelp:Gallery TagWikipedia:Graphics TutorialsWikipedia:Basic Bitmap Image EditingWikipedia:How To Improve Image QualityWikipedia:Graphics Lab/ResourcesHelp:Sound File MarkupWikipedia:SVG HelpHelp:Family TreesWikipedia:Graphs And ChartsWikipedia:How To Create Charts For Wikipedia ArticlesWikipedia:To Scale ChartsHelp:BarchartHelp:Displaying A FormulaWikipedia:Mathematical SymbolsWikipedia:Rendering MathWikipedia:LaTeX SymbolsHelp:ScoreHelp:Musical SymbolsWikipedia:TimelineHelp:EasyTimeline SyntaxHelp:WikiHiero SyntaxHelp:A Quick Guide To TemplatesLua (programming Language)Help:TemplateWikipedia:Template MessagesWikipedia:Citation TemplatesWikipedia:TransclusionHelp:Labeled Section TransclusionHelp:SubstitutionWikipedia:Advanced Template CodingWikipedia:Template LimitsWikipedia:Template Sandbox And Test CasesWikipedia:Template DocumentationWikipedia:PurgeHelp:Job QueueHelp:LuaWikipedia:LuaWikipedia:Lua/To DoWikipedia:Lua/ResourcesWikipedia:Guide To ScribblingWikipedia:AdministrationWikipedia:NamespaceWikipedia:What Is An Article?Help:Talk PagesHelp:Archiving A Talk PageWikipedia:User PagesWikipedia:User Page Design CenterWikipedia:Project NamespaceHelp:FilesHelp:File Description PageHelp:MediaWiki NamespaceWikipedia:Bug Reports And Feature RequestsHelp:System MessageWikipedia:Template NamespaceWikipedia:Help NamespaceHelp:CategoryWikipedia:PortalWikipedia:BooksWikipedia:DraftsWikipedia:Course PagesWikipedia:LuaWikipedia:FlowHelp:Special PageHelp:FilesHTMLCascading Style SheetsHelp:HTML In WikitextHelp:Markup ValidationWikipedia:Span TagsHelp:Cascading Style SheetsWikipedia:Catalogue Of CSS ClassesHelp:Useful StylesWikipedia:WikiProject Microformats/classesWikipedia:Classes In AmboxWikipedia:Common.js And Common.cssHelp:User CSS For A Monospaced Coding FontWikipedia:CustomisationHelp:PreferencesWikipedia:SkinWikipedia:Customizing WatchlistsHelp:Hide Pages In WatchlistWikipedia:GadgetWikipedia:User ScriptsWikipedia:User Scripts/GuideWikipedia:User Scripts/TechniquesWikipedia:ScriptsHelp:User StyleWikipedia:ToolsWikipedia:Tools/Navigation ShortcutsWikipedia:Tools/Browser ToolsWikipedia:Tools/Alternative BrowsingWikipedia:Tools/Editing ToolsWikipedia:Tools/Optimum Tool SetWikipedia:Cleaning Up Vandalism/ToolsHelp:Citation ToolsWikipedia:Wikimedia Cloud ServicesWikipedia:BotsWikipedia:Creating A BotWikipedia:TwinkleWikipedia:HotCatWikipedia:WPCleanerWikipedia:IglooWikipedia:AutoWikiBrowserWikipedia:Tools/Navigation PopupsWikipedia:STikiWikipedia:WikiProject Articles For Creation/Helper ScriptWikipedia:HuggleCategory:Wikipedia Information PagesCategory:Wikipedia How-toTemplate:Wikipedia Help PagesTemplate:Administrators' GuideTemplate:Wikipedia Template MessagesTemplate:Wikipedia ReferencingTemplate:Citation Metadata NavboxWikipedia:WikiProject Accessibility/Navigation MenuTemplate:BotnavWikipedia:User Scripts/NavboxTemplate:Wikipedia AccountsHelp:CategoryCategory:Wikipedia How-toCategory:Wikipedia Text HelpCategory:Wikipedia TablesDiscussion About Edits From This IP Address [n]A List Of Edits Made From This IP Address [y]View The Help Page [c]Discussion About The Content Page [t]Edit This Page [e]Visit The Main Page [z]Guides To Browsing WikipediaFeatured Content – The Best Of WikipediaFind Background Information On Current EventsLoad A Random Article [x]Guidance On How To Use And Edit WikipediaFind Out About WikipediaAbout The Project, What You Can Do, Where To Find ThingsA List Of Recent Changes In The Wiki [r]List Of All English Wikipedia Pages Containing Links To This Page [j]Recent Changes In Pages Linked From This Page [k]Upload Files [u]A List Of All Special Pages [q]Wikipedia:AboutWikipedia:General Disclaimer



view link view link view link view link view link