Monday 14 January 2013

Add Background in HTML

Filled under:

How to add Background Color, Image in HTML
Note: Add Code under <table border="1">

Add Background Color

<table border="1">
<table style="width:180px;height:100px;background-color:lightblue;">
<tr style="background-color:blue;color:white;">
Table
</table>


Table Background Image

<table border="1">
<table style="background-image:url(‘Image_URL’);width:180px;height:100px;border:1px solid black;">
Table
</table>

Example: 
Chand2 Like
Table Title
First Column Second Column
Name of Row1 Value1
Name of Row2 Value2

Non-Repeating Background Image

<table border="1">
<table style="background-image:url(Image_URL);background-repeat:no-repeat;background-position:center center;border:1px solid black;width:180px;height:200px;">
Table
</table>
Example: 
Chand2 Like
Table Title
First ColumnSecond Column
Name of Row1Value1
Name of Row2Value2


0 comments:

Post a Comment