Thuộc tính HTML <col> span
Thí dụ
Ở đây, hai cột đầu tiên phải có màu nền là màu đỏ:
<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>
Định nghĩa và Cách sử dụng
Thuộc
span
tính xác định số cột mà một
<col>
phần tử sẽ trải dài.
Hỗ trợ trình duyệt
Attribute | |||||
---|---|---|---|---|---|
span | Yes | Yes | Yes | Yes | Yes |
Cú pháp
<col span="number">
Giá trị thuộc tính
Value | Description |
---|---|
number | Sets the number of columns a <col> element should span |
❮ Thẻ HTML <col>