![]() |
Website Workshop: HTML |
|
Color and HTML 1) Hex Colors
2) Background Colors and the Transparent GIF A much more efficient solution is to use a clear single-pixel GIF to hold space open within a table, then use the bgcolor attribute for the table cell to provide the background color. This makes for a much faster download, since throughout the page only one image (clear.gif) is required for background color. The color itself is provided in the HTML, not by various images. Using a clear single-pixel GIF will also ensure that the table cell has the height and width measurements that you want. You can be redundant and specify those measurements in both the GIF attributes and the table cell attributes, if you like, but the image attributes will be what really ensures the proper measurements of that table cell. If you only specify the height and width of the table cell, and have no corresponding image of that height and width inside the cell, the cell can sometimes collapse or shift to different dimensions, depending on the browser and what is in the table cells surrounding the one in question.
Next Topic: Cascading Style Sheets
|
||||||||||||||||||||||||||||||||||||||||||||