HTML - Background
Beside a solid color for the background, you might as well use an image. To do this thing follow the example carefully:
<table height="100" width="100" background="../img/image.jpg" > <tr><td>This table has a background image </td></tr> </table> |
Display
|
HTML - Repeated background (tile)
We were lucky in the first example that both the table and the image had the same size. But there are situations where the table is larger than the image, and then the image will multiply itself endlessly.
<table height="100" width="100" background="../img/image.jpg" > <tr><td>This table has a background image </td></tr> </table> |
Display
|
HTML - Patterned Backgrounds
Repeating an image has got another application as you will see in the the following example. This browser's function of repeating the image endlessly can be used as an advantage and that is, we can create a very small image (with the help of Photoshop or Corel Paint Shop PRO), for example 4x4 pixels. This image can be a certain model that will repeat endlessly.
The image :
The image was enlarged to be viewed more clear.
<table height="100" width="150" background="../../img/pattern.jpg" > <tr><td>This table has a background patterned image</td></tr> </table> |
Display
|
HTML - Transparent background color
Another method of using the repeated image is the transparent background. So prove this we will use a '.gif' image.
Placing this image in the background has to be done in the same manner as in the previous example.
<table background="../../img/transparent.gif" > <tr><td>This table has a red transparent background image</td></tr> </table> |



