An image can either be included in a table cell or can act as a background in a table:
1. To add a background image: Use "background" attribute in the opening <TABLE>tag. It will take the URL of the image as its value and the background images are titled throughout the available table space.
Let’s include "shed in field. if " image file as a table background image in Code as:
<HTML>
<HEAD>
<TITLE> TABLE TAGS</TITLE>
</HEAD>
<BODY>
<TABLE BORDER=5 BACKGROUND=”d:\shed in field.gif” WIDTH = “100” HEIGHT = “200” ALIGN=”CENTER”>
<TR BGCOLOR=”PINK”>
<TH>TITLE OF BOOKS</TH>
<TH>AUTHORS</TH>
<TH>COST</TH>
</TR>
<TR>
<TD>DHTML</TD>
<TD>THOMAS A. POWELL</TD>
<TD>RS.200</TD>
</TR>
<TR>
<TD>SAD</TD>
<TD>BGCOLOR=”BLUE “>AWAD</TD>
<TD>RS.150</TD>
</TR>
<TR>
<TD>ANSI C</TD>
<TD>BALAGURUSWAMY</TD>
<TD>RS.250</TD>
</TR>
</TABLE>
</BODY>
</HTML>
2. To include images within Cells: Images can be included within header or data cells. For that add <IMG> attribute between the <TD> or <TH> cell tags with proper URL specifying the source of the image. The following code shows the insertion of an image in a specific cell.
<HTML>
<HEAD>
<TITLE> TABLE TAGS</TITLE>
</HEAD>
<BODY>
<TABLE BORDER=5 BORDERCOLOR=”PINK” WIDTH = “100” HEIGHT = “200” ALIGN=”CENTER”>
<TR BGCOLOR=”PINK”>
<TH>TITLE OF BOOKS</TH>
<TH>AUTHORS</TH>
<TH>COST</TH>
</TR>
<TR>
<TD>DHTML</TD>
<TD>THOMAS A. POWELL</TD>
<TD>RS.200</TD>
</TR>
<TR>
<TD>SAD</TD>
<TD><IMG SRC=”C:\WINDOWS\HLPGLOBE.GIF” HEIGHT=68 WIDTH=55>AWAD</TD>
<TD>RS.150</TD>
</TR>
<TR>
<TD>ANSI C</TD>
<TD>BALAGURUSWAMY</TD>
<TD>RS.250</TD>
</TR>
</TABLE>
</BODY>
</HTML>
Dinesh Thakur is a Columinist and designer with strong passion and founder
of Computer Notes. if you have any ideas or any request please get @me on Google+
![]()