O'Reilly logo

Wikipedia: The Missing Manual by John Broughton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Editing and Creating Tables

Tables are ideal for presenting information in a row-and-column format. You create Wikipedia tables using wiki markup, which begins with “{|” and ends with “|}”. Since you’ll edit tables much more often than create them, this section begins with editing. (To see how to create a wikicode table, flip to Creating Tables.)

Editing Tables

Even if you never create a table from scratch, you still need to understand the basic structure to edit a table. Figure 14-13 shows the wikicode underlying a simple table.

Here’s a table (top) and its underlying wikicode (bottom). The wikicode is split into seven chunks by six blank lines, for ease of understanding. You don’t usually find blank lines in the wikicode between rows of a table, as is the case here. (These blank lines make no difference in what the reader sees.)

Figure 14-13. Here’s a table (top) and its underlying wikicode (bottom). The wikicode is split into seven chunks by six blank lines, for ease of understanding. You don’t usually find blank lines in the wikicode between rows of a table, as is the case here. (These blank lines make no difference in what the reader sees.)

Here are the elements of the wikicode that makes up a table:

  • 1. A table always begins with “{|”. In this case, an optional parameter, class="wikitable”, has been added. That parameter tells the software to do standard table formatting, such as shading the top row.

  • 2. This line adds an optional caption (starting with “|+”).

  • 3 through 6. Each row of a table, including column headings (if any) consists of two or more lines, with the first line essentially saying, “A new row starts here!”

  • 3, 4, 5 and 6 illustrate four different ways that cells in a table ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required