Tag caption

Die caption-tag is bedoel om 'n opskrif vir die hele HTML-tabel te skep. So 'n opskrif is teks wat by verstek voor die tabel vertoon word en die inhoud daarvan beskryf.

Hierdie tag kan slegs geplaas word binne die table-tag, en wel direk na die openingstag.

Voorbeeld

Kom ons voeg 'n caption-opskrif by die tabel:

html<table>
  <caption>this is the title of the entire table</caption>
  <tr>
    <th>Name</th>
    <th>Surn</th>
    <th>Salary</th>
  </tr>
  <tr>
    <td>name1</td>
    <td>surn1</td>
    <td>200$</td>
  </tr>
  <tr>
    <td>name2</td>
    <td>surn2</td>
    <td>1000$</td>
  </tr>
</table>
csstable, td, th {
  border: 1px solid black;
}

Результат:

Sien ook

  • die table-tag,
    wat 'n tabel skep
  • die title-tag,
    wat 'n opskrif vir die hele bladsy spesifiseer