4. การกาหนดข้อความกากับให้กับตาราง <caption>
<table border="1" width="20%">
<caption>this will show you how to make a caption</caption>
<tr>
<td>column1</td>
<td>column2</td>
</tr>
</table>
www.rongrean.com Orjix
เราสามารถใช้ attribute align=“…”
เพื่อกาหนดตาแหน่งของ caption ได้เช่น
<caption align=“bottom”>…..
18. จัดตาแหน่งข้อมูลในตาราง
เราสามารถจัดข้อมูลที่แสดงให้อยู่ชิดขวา ชิดซ้าย หรือตรงกลางได้ดังนี้
www.rongrean.com Orjix
<table border="1px" >
<tr>
<td width="150px" align="right">column1</td>
<td width="150px" align="center">column2</td>
<td width="150px" align="left">column3</td>
<td width="150px" align="justify">
column 4 test test test test test test test test test test
</td>
</tr>
</table>
Rigth ข้อความชิดขอบขวา
left ข้อความชิดขอบซ้าย
center ข้อความอยู่ตรงกลาง
Justify *รูปแบบนี้จัดให้ข้อความอยู่เต็มช่อง คือติดทั้งขอบซ้ายและขวา (อย่างเช่นข้อความในคอลัมน์หนังสือพิมพ์)
right center left justify