HTML <col>

<col> va <colgroup> elementi HTML jadvallarga uslub ( dizayn ) berish uchun ishlatiladi. <col> tegi <clogroup> tegi ichiga yoziladi.

Ming marta eshitgandan bir marta ko'rgan yaxshi. Hozir amalda sinab ko'ramiz.

<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
  border: 1px solid black;
}
</style>
</head>
<body>

<h1>UzbekDevsa da kurs narxlari</h1>

<table>
  <colgroup>
    <col span="2" style="background-color:red">
    <col style="background-color:yellow">
  </colgroup>
  <tr>
    <th>kURS NOMI</th>
    <th>Narxi</th>
    <th>Chegirma</th>
  </tr>
  <tr>
    <td>FrontEnd</td>
    <td>Narxi 0$</td>
    <td>100% </td>
  </tr>
  <tr>
    <td>BeckEnd</td>
    <td>Narxi 0$</td>
    <td>100%</td>
  </tr>
</table>

</body>
</html>

Natija :

<col> elementining ham o'z CSS standart qiymatlari mavjud.

col {
  display: table-column;
}

Bu <col> elementining maxsus CSS qiymatlari hisoblanadi. O'rganishning eng zo'r yo'lini aytaman. Shunchaki takrorlang amaliyotda.