HTML <col> tag
contoh
<COLGROUP> dan <col> tag untuk tiga kolom dalam tabel mengatur warna latar belakang:
<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>
Coba »
Dukungan Browser
Semua browser utama mendukung <col> tag.
Tag definisi dan petunjuk
<Col> menspesifikasikan tag <colgroup> atribut kolom untuk setiap elemen kolom dalam.
Dengan menggunakan <col> tag, Anda dapat menerapkan gaya ke kolom seluruh, daripada membutuhkan diulang untuk setiap sel di setiap baris atau merubah style.
Perbedaan antara HTML 4.01 dan HTML5
HTML5 tidak lagi didukung di HTML 4.01 di sebagian besar properti.
Perbedaan antara HTML dan XHTML
Dalam HTML, <col> tag tidak memiliki tag akhir.
Dalam XHTML, <col> tag harus ditutup dengan benar.
milik
属性 | 值 | 描述 |
---|---|---|
align | left right center justify char |
HTML5 不支持。规定与 <col> 元素相关的内容的水平对齐方式。 |
char | character | HTML5 不支持。规定根据哪个字符来对齐与 <col> 元素相关的内容。 |
charoff | number | HTML5 不支持。规定第一个对齐字符的偏移量。 |
span | number | 规定 <col> 元素应该横跨的列数。 |
valign | top middle bottom baseline |
HTML5 不支持。规定与 <col> 元素相关的内容的垂直对齐方式。 |
width | % pixels relative_length |
HTML5 不支持。 Specifies the width of a <col> element |
Properti global
<Col> tag mendukung HTML sifat global yang .
Properti acara
<Col> tag mendukung HTML sifat acara .