Sobes.tech
Intern

HTMLдеги таблицанын түзүлүшү кандай?

sobes.tech AI

AIден жооп

HTML'de stolbikterdiń qurylysy birneşe elementtermen belgilenedi:

  • <table>: Stolbikterdiń qaptasy.
  • <caption>: Qolıstı stolbiktiń atı.
  • <colgroup> jäne <col>: Stolbikterdi topqağa qoyıp, stil' qoldanu üşin qoldanıladı.
  • <thead>: Stolbiktiń atqary bölimi.
  • <tbody>: Nıq mazmūn bölimi.
  • <tfoot>: Stolbiktiń astı bölimi.
  • <tr>: Stolbiktiń satırı.
  • <th>: Satırda atqary hujaji.
  • <td>: Satırda mälimet hujaji.

<thead>, <tbody> jäne <tfoot> elementteri ma'noni topqağa qoyuğa kömektesedi jäne ulı stolbikterdiń körsetilwin optimallashtırw üşin brauzerler tarafınan paydalanuwı mümkin. Bul bölimderde <tr> elementteri orın aladı. <tr> içinde <th> (köbіне <thead>-de, bəzende <tbody> nemese <tfoot>-de) nemese <td> ( <tbody> jäne <tfoot>-de, bəzende <thead>-de) orın aladı.

Nümuneli quraldyń quraqşılığı:

<table>
  <caption>
    Maşulottar tizimi
  </caption>
  <thead>
    <tr>
      <th>Atı</th>
      <th>Bağası</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Maşulot 1</td>
      <td>100</td>
    </tr>
    <tr>
      <td>Maşulot 2</td>
      <td>150</td>
    </tr>
  </tbody>
  <tfoot>
    <tr>
      <td colspan="2">Jami: 250</td>
    </tr>
  </tfoot>
</table>