Intern
What are the <tr>, <th>, and <td> tags used for in HTML?
sobes.tech AI
Answer from AI
The tags <tr>, <th>, and <td> are used to create tables in HTML.
<tr>(table row) — defines a row in the table.<th>(table header) — defines a header cell in a row. Usually, the text in such a cell is displayed in bold and centered.<td>(table data) — defines a data cell in a row. Contains the main information in the table.
Example of a simple table:
<table>
<tr>
<th>Header 1</th>
<th>Header 2</th>
</tr>
<tr>
<td>Data 1</td>
<td>Data 2</td>
</tr>
</table>