HTML <col> สแปนแอตทริบิวต์
ตัวอย่าง
ในที่นี้ สองคอลัมน์แรกควรมีสีพื้นหลังเป็นสีแดง:
<table>
<colgroup>
<col span="2" style="background-color:red">
<col style="background-color:yellow">
</colgroup>
<tr>
<th>ISBN</th>
<th>Title</th>
<th>Price</th>
</tr>
<tr>
<td>3476896</td>
<td>My first HTML</td>
<td>$53</td>
</tr>
</table>
ความหมายและการใช้งาน
แอตทริบิวต์
span
กำหนดจำนวนคอลัมน์ที่
<col>
องค์ประกอบควรขยาย
รองรับเบราว์เซอร์
Attribute | |||||
---|---|---|---|---|---|
span | Yes | Yes | Yes | Yes | Yes |
ไวยากรณ์
<col span="number">
ค่าแอตทริบิวต์
Value | Description |
---|---|
number | Sets the number of columns a <col> element should span |
❮ แท็ก HTML <col>