Die td-tag

Die td-tag spesifiseer 'n gewone sel in 'n HTML-tabel.

Voorbeeld

Laat ons 'n tabel skep met selle th en td:

html<table>
  <tr>
    <th>Naam</th>
    <th>Van</th>
    <th>Salaris</th>
  </tr>
  <tr>
    <td>naam1</td>
    <td>van1</td>
    <td>200$</td>
  </tr>
  <tr>
    <td>naam2</td>
    <td>van2</td>
    <td>1000$</td>
  </tr>
</table>
csstable, td, th {
  border: 1px solid black;
}

Результат:

Sien ook

  • tags thead, tbody en tfoot,
    wat tabelrye groepeer
  • die caption-tag,
    wat die hoofopskrif vir die hele tabel spesifiseer
  • die vertical-align-eienskap,
    wat vertikale teksbelyning spesifiseer
  • die rowspan- en colspan-kenmerke,
    wat tabelrye en kolomme saamvoeg