Monday, September 10, 2007

Attribut TD on table


BGCOLOR and BACKGROUND

Bgcolor used to give a background color in the table cell. And if you want to give a background image use the background attribute. Remember the image must be one place with the HTML file.

example

<table>
<tr>
<td bgcolor="yellow">A<td bgcolor="purple">B</td>
</tr>
</table>

Here is ther result -- Ini hasilnya.




AB


ALIGN and VALIGN

Align use to arrange horisontal alligment in the cell table. The value is left, right and center.
Valign use to arrange vertical aligment, the value is top, bottom and middle.

The example

<table width=250 height=200 border=1>
<tr>
<td align="right" valign="top">A</td>
<td align="left" valign="bottom">B</td>
</tr>
</table>

here the result





AB

0 Comments:

Post a Comment

<< Home