Tagul th
Tagul th definește o celulă de antet în
tabelul HTML.
În mod implicit, textul din celula de antet
este centrat și îngroșat. Acest comportament poate fi
modificat folosind proprietățile CSS text-align
și font-weight.
Exemplu
Să creăm un tabel cu celulele th
și td:
<table>
<tr>
<th>Nume</th>
<th>Prenume</th>
<th>Salariu</th>
</tr>
<tr>
<td>nume1</td>
<td>prenume1</td>
<td>200$</td>
</tr>
<tr>
<td>nume2</td>
<td>prenume2</td>
<td>1000$</td>
</tr>
</table>
table, td, th {
border: 1px solid black;
}
: