Tables

or scroll down the page.

Return to Main Page of Ted’s HTML Tutorial

One of the most useful tools for presenting information is a table.  Unlike with most word-processing programs, however, there is no preset table structure or framework available in HTML into which information can be placed.  For this reason, it is recommended that a skeleton of the final table one wishes to have first be drawn on paper to visualize it more easily before converting it into HTML commands.

When creating a table, one should realize two things: 1) that numerous HTML tags must be used and 2) that the “vertically oriented” set of table tags in the HTML source code document looks virtually nothing like the final “horizontally oriented” table which is marked up on a browser.  (Table Examples will be given after all the attributes of tables have been described.)  HTML tables are created using “table” tags in the source code document:

Table “rows” and “data cells” will be explained later.  First, though, other table-related parameters and tags will be defined.  A <TABLE> tag may contain within it other parameters as part of the command:


Following a <TABLE> tag, an optional set of “caption” tags may be inserted:

A <CAPTION> tag may contain within it an alignment parameter as part of the command:


Another optional set of tags, “table heading” tags, also may follow a <TABLE> tag (after the optional caption):

A <TH> tag may contain within it other parameters as part of the command:


As stated before, a table is composed of rows of cells.  To create a row, a pair of “table row” tags is used:

A <TR> tag may contain within it other parameters as part of the command: To create each cell in a row, a pair of “table data” (cell) tags is used: A <TD> tag may contain within it other parameters as part of the command:

Proceed to Table Examples

Proceed to Forms

Return to Main Page of Ted’s HTML Tutorial

Copyright © 1998– by Ted M. Montgomery.  All rights reserved.