#HTML's tables
HTML tables are defined using the <table>
tag.
- Table headers use the
<thead>
tag - Table body uses the
<tbody>
tag - Table rows use the
<tr>
tag - Header cells use the
<th>
tag - Standard cells use the
<td>
tag.
<table border="1">
<thead>
<tr>
<th scope="col">No.</th> <!-- Column header -->
<th scope="col">Tag</th> <!-- Column header -->
<th scope="col">Description</th> <!-- Column header -->
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th> <!-- Row header -->
<td>table</td>
<td>Defines a table</td>
</tr>
<tr>
<th scope="row">2</th> <!-- Row header -->
<td>tr</td>
<td>Defines a table row</td>
</tr>
<tr>
<th scope="row">3</th> <!-- Row header -->
<td>th</td>
<td>Defines a header cell</td>
</tr>
<tr>
<th scope="row">4</th> <!-- Row header -->
<td>td</td>
<td>Defines a standard cell</td>
</tr>
</tbody>
</table>
HTML Table
No. Tag Description 1 table Defines a table 2 tr Defines a table row 3 th Defines a header cell 4 td Defines a standard cell