HTML | Tags and Attributes [TABLE] [Formatting] [Cell spacing and cell padding ]



Ü Adjust cell spacing and cell padding : The value of CELLSPACING specifies the amount of space between the cells and the value of CELLPADDING specifies the space between the border and the cell data. Use these tags between the <TABLE> tags. We can use them also in <TH> and <TD> tag for results in a particular cell. See the following image to understand, The above figures are the output of the following input,






Input :
<HTML><HEAD><TITLE>TABLE</TITLE></HEAD>
<BODY> Use of cellspacing and cellpadding..<BR>
<TABLE BORDER=3 WIDTH=50% CELLSPACING=15 CELLPADDING=15>
<CAPTION><B><U><FONT SIZE=5>AMERICA</FONT></B></U></CAPTION>
<TR>
<TD BGCOLOR=YELLOW ALIGN=CENTER COLSPAN=2>USA</TD>
</TR>
<TR>
<TD BGCOLOR=RED >New York</TD>
<TD BGCOLOR=GREEN ALIGN=CENTER>New Jersy</TD>
</TR>
</TABLE></BODY></HTML>
Output: 







Recommended Recommends

Comments

Contact Us