Web Publishing An Introduction

Tables


HTML Tables
 
 

Tables are a very useful tool for web pages. Not only do they allow you to present information in a traditional tabular format such as you might use in a word-processing document, but they also allow you to control the overall layout of a page by splitting it up into sections. You can insert images into tables as well as text and numbers.  Most web pages are made up in tables, they give much more control over general layout and especially images.

Table terminology

cell
the smallest component of a table. A row or column contains one or more cells
caption
a descriptive title that goes above or below a table
header
cells across the top or down the side of a table that have a title in bold that identifies the data
span
a cell can span more than one row or column
border
line that divides the table from the rest of the page or cells from one another. Has a width measured in pixels. If this is 0, the table border is invisible
cellspacing
the space (in pixels) between cells
cellpadding
the space between the contents of a cell and the edges of the cell.

The table below has Border = 2, Cellspacing = 3 and Cellpadding = 8. Its width is 80% of the page.

Rowspan = 2 Colspan = 2 Header
Col 1 Col 2 Col 3 Col 4
Row 1        
Row 2        

Table design

Even in FrontPage, where creating a table is very easy, it is worth doing a sketch on paper of what you want your table to look like before you start. If you don't want a visible table but have an idea for a specific page layout, sketch the blocks of text and images and try to draw a grid for them.

 Top