HTML Basix - HTML tutorials and online webmaster tools


Htaccess code generators Code generators Tutorials

Online and offline code generators


Subscribe to RSS feed
Subscribe to the HTML Basix RSS feed.
Borders  width  cellpadding  background images  rowspan 
alignment  height  cellspacing  background colour  colspan 


Table Attributes


continued...

Background Images

You can set your whole table to have a background image, or just the individual data cell. If you put the background image in the data cell, then you could set each cell to have a different image.


using table background images

<table width="200" height="200" background="clover.gif">
<tr>
<td>
first cell
</td>
<td>
second cell
</td>
</tr>
</table>
putting the background in the entire table if you have multiple cells, the background still covers them all.




using td background images

<table width="200" height="200">
<tr>
<td background="clover.gif">
first cell
</td>
<td>
second cell
</td>
</tr>
</table>
putting the background into a data cell if you have multiple cells, the rest aren't affected by the background



using multiple td background images

<table width="200" height="200">
<tr>
<td background="clover.gif">
first cell
</td>
<td background="stained_glass_spirals.jpg">
second cell
</td>
</tr>
</table>
putting the background into a data cell you can set different backgrounds in each data cell



mixing table and td background images

<table width="200" height="200" background="engravedflowers.gif">
<tr>
<td>
first cell
</td>
<td background="stained_glass_spirals.jpg">
second cell
</td>
<td>
third cell
</td>
</tr>
</table>
this data cell has no background set so it has the table background showing through this data cell has a background specified this data cell has no background set so it has the table background showing through


Background Colour

using table background colours

<table width="200" height="200" bgcolor="#ff0000">
<tr>
<td>
first cell
</td>
<td>
second cell
</td>
</tr>
</table>
setting the background colour in the entire table if you have multiple cells, the background colour still covers them all.



using td background colours

<table width="200" height="200">
<tr>
<td bgcolor="#ff0000">
first cell
</td>
<td>
second cell
</td>
</tr>
</table>
putting the background colour into a data cell if you have multiple cells, the rest aren't affected by the background colour of another cell



using multiple td background colours

<table width="200" height="200">
<tr>
<td bgcolor="#ff0000">
first cell
</td>
<td bgcolor="#c0c0c0">
second cell
</td>
</tr>
</table>
putting the background colour into a data cell you can set different background colours in each data cell



mixing table background colours and td background colours

<table width="200" height="200" bgcolor="#ff0000">
<tr>
<td>
first cell
</td>
<td bgcolor="#c0c0c0">
second cell
</td>
<td>
third cell
</td>
</tr>
</table>
this data cell has no background colour set so it has the table background colour showing through this data cell has a background colour specified this data cell has no background colour set so it has the table background colour showing through



mixing background colours and background images

<table width="200" height="200" bgcolor="#ff0000">
<tr>
<td>
first cell
</td>
<td background="clover.gif">
second cell
</td>
<td bgcolor="#c0c0c0">
third cell
</td>
</tr>
</table>
this data cell has no background colour set so it has the table background colour showing through this data cell has a background specified this data cell has a background colour set




Site Stats     
VisitorsPageviews
Total: 9,486,069 Total: 27,614,591
Today: 53 Today: 462
Yesterday: 565 Yesterday: 1,200
Past Month: 17,515 Past Month: 37,200

559 visitors in the last 24 hours
This page has been visited 17,823 times
There are currently 10 visitors online
click to see where
most people online at once:
286 visitors on 06/27/2012
   You beaut











This site is © HTML Basix 2003 - 2009