Tuesday, 27 May 2014

HTML Background Colors & Images

Filled under:

Post By: Hanan Mannan
Contact Number: Pak (+92)-321-59-95-634
-------------------------------------------------------

HTML Background Colors & Images


There are two ways to decorate your web page background.
  • Html Background Colors
  • Html Background Images

Patterned & Transparent Backgrounds:

You might have seen many pattern or transparent backgrounds on various websites. This simply can be achieved by using patterend image or transparent image in the background.
It is suggested that when creating patterns or transparent gifs, use the smallest dimensions possible even as small as 1x1 if you can. Larger files load slow and inhibit the load time of your sites.
Here are the examples to set background pattern of a table.
<!-- How to set a table background using pattrern -->
<table background="/images/pattern1.gif" width="100%"  height="100">
<tr><td>
This background is filled up with a pattern image.
</td></tr>
</table>
<!-- Another example on table background using pattrern -->
<table background="/images/pattern2.gif" width="100%"  height="100">
<tr><td>
This background is filled up with a pattern image.
</td></tr>
</table>
This will produce following result:
This background is filled up with a pattern image.
This background is filled up with a pattern image.

0 comments: