HTML Old School

TR, TD and TH tags

<tr></tr> - creates table row

<th></th> - creates table header cell

<td></td> - creates table cell

 

A) TR tag

A.1. align="left | right | center"

Aligns text horizontally inside cell. The settings are valid in the whole row.

Align: 0908table_tr_align.html

 

A.2. valign="top | middle | bottom"

Aligns text vertically inside cell. The settings are valid in the whole row.

Valign: 0909table_tr_valign.html

 

A.3. bgcolor="#FCF"

Defines cell background color.

Bgcolor: 0910table_tr_bgcolor.html

 

A.4 background="./path/to/image.jpg"

Defines background image. Takes effect on the whole row.

Background: 0911table_tr_background.html

 

 

 

B) TD, TH tags

TD tag is table cell , and TH is table cell header.

The text in TH is centered and bold.

Example: 0912table_td_th.html

 

B.1. width="px | %"  ,   height="px | %"

Width defines not only the width of the cell but the witdth of the column, also height defines not only height of the cell but the whole row.

If width or height is expressed in % that means the percent of the table dimensions.

Example: 0913table_td_width_height.html

 

 B.2 align="left | center | right"  ,  valign="top | middle | bottom"

 Defines text position in the table cell.

Example with valign and align: 0914table_td_align_valign.html

 

B.3 background="./path/to/image.jpg"   ,   bgcolor=#FCF#

- background image or background color

Example: 0915table_td_bgcolor_background.html

 

B.4. nowrap

 Prevent text wrapping inside table cell.

Nowrap example: 0916table_td_nowrap.html

 

B.5. colspan="2"

 Spans table cell to 2 columns. Very important attribute.

Colspan example: 0916table_td_colspan.html

 

B.6. rowspan="2"

 Spans table cell to 2 rows. Also important attribute.

Rowspan example: 0916table_td_rowspan.html