Producing web pages
* HTML CSS DHTML XHTML A to Z of tags        Accessibility          Design

Table properties

This category is new in CSS2 and the properties allow you to control the look of tables:

Property

Description

Values

Example

table-layout

Sets a fixed height and width for a table

auto
fixed

table {table-layout:fixed; width=”600”}

border-collapse

Sets whether the row and cell borders of a table are joined into a single border

collapse
separate

table {border-collapse: separate}

border-spacing

Sets the distance between borders of adjacent cells

millimetres (mm)
centimetres (cm)
inches (in)
points (pt)
picas (pc)
pixels (px)
height of font (em)
height of letter x (ex)

table { border-spacing: 15pt}

caption-side

Adds a caption to a table

top
bottom
left
right

table {caption-side: top}

empty-cell

Sets whether empty cells are hidden or not

hide
show

table {empty-cell:hide}

speak-header

Specifies whether to speak the header of a table

always
once

table {speak-header:once}