A table colored with bgcolor:
| This table's bgcolor is purple. Row 1's bgcolor is white, row 2's is aqua, and row 3's is yellow. | |
|---|---|
| cell 1, row 2, bgcolor = red | cell 2, row 2, no bgcolor |
| cell 1, row 3, no bgcolor | cell 2, row 3, bgcolor = red |
| no bgcolor in row or cell | |
A table colored with background images:
| This table has a blue background image. This cell has a gold background image. | |
|---|---|
| This cell has a green background image. | This cell has no background image. |
| The background attribute for tables and table elements is not supported in HTML 4.0., but you can add background images to some elements with stylesheets. (this cell's bgcolor = white) | |
A table colored with a stylesheet:
| This table has both background images and bgcolors for every element.
Table: color=purple, image=blue - Row 1: color=white, image=gold - Row 2: color=aqua, image=green This cell: color=yellow, image=peach | |
|---|---|
| This cell inherits its bgcolor. Its background image is pink. | This cell inherits its background image. Its bgcolor is gray. |
| no bgcolor or image in this row and cell | |