Share this Page URL

Using Styles with Tables > Using the THEAD, TBODY, and TFOOT Elements - Pg. 181

178 Learn HTML 4 In a Weekend <caption style="margin-bottom: 24px">Table I. First Quarter Sales Results</caption> <tr bgcolor="#ccffcc" valign="bottom"><th rowspan="2" width="80" background="b_lightgreen.jpg"><font face="Arial, Geneva, Helvetica" color="blue">Sales<br>Agents</font></th><th colspan="3" background="b_lightgreen.jpg"><font size="+2" face="Arial, Geneva, Helvetica" color="maroon">First Quarter Sales Report</font></th><th rowspan="2" width="21%" background="b_lightgreen.jpg"><font face="Arial, Geneva, Helvetica" color="blue">Quarter<br>Totals</font></th></tr> <tr bgcolor="#ffffcc"><th width="21%" background="b_parchment. gif"><font face="Arial, Geneva, Helvetica" color="blue">Jan</font></th> <th width="21%" background="b_parchment.gif"><font face="Arial, Geneva, Helvetica" color="blue">Feb</font></th> <th width="21%" background="b_parchment.gif"><font face="Arial, Geneva, Helvetica" color="blue">Mar</font></th></tr> [...] <tr bgcolor="#ffcccc" align="right" valign="bottom"><th align="left" height="32" background="b_pink.gif">Totals</th> <td background="b_pink.gif"><font color="red" face="Arial, Geneva, Helvetica"><b>$991,367</b></font></td> <td background="b_pink.gif"><font color="red" face="Arial, Geneva, Helvetica"><b>$1,271,071</b></font></td> <td background="b_pink.gif"><font color="red" face="Arial, Geneva, Helvetica"><b>$849,045</b></font></td> <td background="b_pink.gif"><font color="red" face="Arial, Geneva, Helvetica"><b>$3,111,483</b></font></td></tr> </table> When displaying a background image in a table, you need to be aware that users with display of graphics turned off in their browsers won't be able to see your background image. Thus, whenever setting a background image for a table, you should also set a background color of similar hue and tone as a fallback. Removing Borders and Cell Spacing Background colors and images set for the TR, TD, or TH elements are displayed behind the table cells, but not behind the spacing between the