ATTRIBUTE ON TABLE IN HTML CODE
BORDER
Border use to make a border in the table, when border attribute didn't place in the table the preview not look a table. The value on the pixels.
for example :
<TABLE>
<TR>
<TD>A</TD><TD>B</TD>
</TR>
</TABLE>
The preview like this
But you can see if the table have a border attribute like this example:
<TABLE BORDER=1>
<TR>
<TD>A</TD><TD>B</TD>
</TR>
</TABLE>
Here is the result
You can see the different from both, isn't ?
CELLSPACING AND CELLPADDING
To give a distance of cell use the cellspacing atribute, but if you want to give distance cell with the text/content of column use the cellpadding attribute.
The example like this -- Contohnya sbb:
<TABLE BORDER=1 CELLPADDING=5 CELLSPACING=5>
<TR>
<TD>A</TD><TD>B</TD>
</TR>
</TABLE>
Here the result
WIDTH AND HEIGHT
Width use to arrange wide of the table, its can use pixels or percent value. To arrange hight of the table you can use Height attribute.
For example -- Contohnya
<TABLE BORDER=1 CELLPADDING=5 CELLSPACING=5 WIDTH=250 HEIGHT=250>
<TR>
<TD>A</TD><TD>B</TD>
</TR>
</TABLE>
Here the result
BGCOLOR or BACKGROUND
Do you remember BGCOLOR dan BACKGRAUND atribute in BODY tag? the function is same, but it use to give a background of the table. IF the background is color you can use the bgcolor attribute but if the background is picture use the background attribute.
The example using background color :
<TABLE BGCOLOR="blue" BORDER=1 CELLPADDING=5 CELLSPACING=5 WIDTH=250 HEIGHT=250>
<TR>
<TD>A</TD><TD>B</TD>
</TR>
</TABLE>
The result
The example using background picture :
<TABLE BACKGROUND="01.jpg" BORDER=1 CELLPADDING=5 CELLSPACING=5 WIDTH=250 HEIGHT=250>
<TR>
<TD>A</TD><TD>B</TD>
</TR>
</TABLE>
The result
To be Continued....
Border use to make a border in the table, when border attribute didn't place in the table the preview not look a table. The value on the pixels.
for example :
<TABLE>
<TR>
<TD>A</TD><TD>B</TD>
</TR>
</TABLE>
The preview like this
A | B |
<TABLE BORDER=1>
<TR>
<TD>A</TD><TD>B</TD>
</TR>
</TABLE>
Here is the result
A | B |
CELLSPACING AND CELLPADDING
To give a distance of cell use the cellspacing atribute, but if you want to give distance cell with the text/content of column use the cellpadding attribute.
The example like this -- Contohnya sbb:
<TABLE BORDER=1 CELLPADDING=5 CELLSPACING=5>
<TR>
<TD>A</TD><TD>B</TD>
</TR>
</TABLE>
Here the result
A | B |
Width use to arrange wide of the table, its can use pixels or percent value. To arrange hight of the table you can use Height attribute.
For example -- Contohnya
<TABLE BORDER=1 CELLPADDING=5 CELLSPACING=5 WIDTH=250 HEIGHT=250>
<TR>
<TD>A</TD><TD>B</TD>
</TR>
</TABLE>
Here the result
A | B |
Do you remember BGCOLOR dan BACKGRAUND atribute in BODY tag? the function is same, but it use to give a background of the table. IF the background is color you can use the bgcolor attribute but if the background is picture use the background attribute.
The example using background color :
<TABLE BGCOLOR="blue" BORDER=1 CELLPADDING=5 CELLSPACING=5 WIDTH=250 HEIGHT=250>
<TR>
<TD>A</TD><TD>B</TD>
</TR>
</TABLE>
The result
A | B |
<TABLE BACKGROUND="01.jpg" BORDER=1 CELLPADDING=5 CELLSPACING=5 WIDTH=250 HEIGHT=250>
<TR>
<TD>A</TD><TD>B</TD>
</TR>
</TABLE>
The result
A | B |
To be Continued....
0 Comments:
Post a Comment
<< Home