A table is an arrangement of columns and rows that organizes and positions data. Tables can be created on Wikipedia pages using special wikitext syntax, and many different styles and tricks can be used to customise them.

Tables can be used as formatting instrument, but consider using a multi column list instead.

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.

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 pxpixel sizing, prefer relative values with % and em units. Content can automatically shrink to fit.

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:

{|
|+ captiontable 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.

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 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.

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 wikitableCSS class, which in Wikipedia's external style sheet is defined to apply a gray color scheme and cell borders to tables using it:

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)

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.) Use a third pipe character to render your first pipe character.

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.

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:

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.

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.

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:

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 W3Callows 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:

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".

You can also place tables side by side by adding style="display: inline-table;" to the opening of your table. The tables will wrap depending on screen width. Narrow your browser window to see. For example:

You can add images to the mix by removing the display: inline-table; styling from within the tables and putting the styling in between each item. Also add vertical-align:top; to align every item to the top. The tables and images will wrap depending on screen width. Narrow your browser window to see. For example:

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:

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:

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.

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.

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.)

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.

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.

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.

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.

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.

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.

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:

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.

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.

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.

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:

{{diagonal split header|HEADER-FOR-ROW-HEADERS|HEADER-FOR-COLUMN-HEADERS}} can be used 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.

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:

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:

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:

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.

Classes can also be used to collapse tables, so they are hidden by default. Use the class mw-collapsible to enable collapsing behaviour. Collapsible tables can be sortable, too, by also including the sortable class; (see § Sortable tables). By default, a collapsible table begins expanded. To change this, add the additional class mw-collapsed. Alternatively, you can add autocollapse, instead of mw-collapsed, which will automatically collapse the table if two or more collapsible elements are present on the page.

Note: Previous versions of this article recommended the collapsible class, but mw-collapsible is now preferred. It is a feature of the MediaWiki software, not a local customization, and can be used to make any element collapsible, not just tables. mw-collapsible also does not require a header row in the table, as collapsible did. Tables will show the "[hide]" / "[show]" controls in the first row of the table (whether or not it is a header row), unless a table caption is present.(see § Tables with captions)

Tables can be made sortable by adding the CSSsortable; 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.

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.

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

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

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.

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:

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).

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:

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.

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:

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:

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:

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;:

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>.

See Phab: T108245: "Fully support basic table editing in the visual editor". See the list of tasks. Finished tasks are struck. It can be difficult to figure out from the technical language there what exactly has been improved, or what features have been added. Please add explanatory info below.

In the column you are copying click the header cell. Then shift-click any cell in the column. This will select the column down to that cell. Then click "copy" from the edit menu of your browser. In some browsers you can do this from the popup context menu. Then click any blank spot on the page to deselect the column.

Go to the column you want to replace or fill in (in this table or another one). Be sure visual editor has been launched. Select just the header cell for that column by clicking on it. Then click "paste" from the edit menu of your browser.

You can paste into a blank column the same way. Just select the header cell. Then from your browser: edit menu > paste.

Click on the top corner cell of the area you want to select. Then shift-click on the opposite top corner cell in the same row. Then go straight down and shift-click on the bottom corner cell on the same side of the area you want to select. You will now have a rectangle or square selected of the table.

Click on "copy" or "cut" as needed from the edit menu of your browser. "Delete" will not work for multiple rows and columns.

Click on the top left corner cell of the area you want to paste into in a table. Then click "paste" from the edit menu of your browser. It can take from a few seconds to up to a minute for very large areas. You might want to do this work in a sandbox first. Then save and edit further before putting anything in an article.

"Cut" will empty the selected cells. It does not delete them. Once empty though it is very easy to delete all the empty cells, rows, and columns in the source editor. Switch over to it by clicking the arrow at the top right of the editing window.

It may be even faster to use the Visual Editor to copy the parts you want from the table into a new blank table.

It is now possible to copy and paste a table from a web page directly into the Visual Editor (VE). Use an empty sandbox to do this most quickly. Save it, and edit further before pasting it into an article.

Select the table on the web page. Then click "copy" from the edit menu of your browser. In some browsers you can do this from the popup context menu. Then go to a sandbox page. Launch visual editor. Click on the insert menu, and then "table". It usually has the first header in the table selected. Then click on "paste" from the edit menu of your browser. It may take awhile for the table to show up. It can take 3 seconds, or up to a minute for very large tables. Not all tables work.

Note: For more info see Help:Sorting. See the section on putting a table in initial alphabetical order.

Many things can be done in spreadsheet programs that can not be done in the visual editor. Select and copy a table right off of a page (do not go into the wikitext or the HTML). Paste the table into a spreadsheet program such as freeware LibreOffice Calc or another spreadsheet program. See List of spreadsheet software.

In Calc click on any cell in the column you want sorted, and then click on one of the sort options in the data menu at the top of the Calc window. Click on "ascending" or "descending" to sort alphabetically or numerically depending on the column contents. Click on "sort" for more options.

Paste that sorted table into a new table in Visual Editor. Copy directly from the spreadsheet, and then paste directly into a new Visual Editor table where the first header cell has been selected. It may take up to a minute. You can copy the whole table or selected columns.

Upload PDF to free online PDF-to-Excel site. For example; here. Download the Excel file. Open it in freeware LibreOffice Calc or another spreadsheet program. You can select a table from a long Calc page, and copy the table to a new page in Calc.

Edit and move columns and rows in Calc. To drag a column first select it by clicking its header number. Then click a data cell, and drag the column to a new location. Or right click and delete the column. Rows are similarly moved or deleted. Sort as described in the previous section.

Copy the table to a wiki sandbox. In Calc select the table. Copy directly from it, and then paste into a new Visual Editor table where the first header cell has been selected. It may take up to a minute.