Computer Science, asked by priya212074, 2 days ago

Explain the use of <tr>tag with an example.​

Answers

Answered by Anonymous
2

The HTML <tr> tag defines a row in an HTML table. Each <tr> tag can contain one or more <th> tags that define header cells in the table or one or more <td> tags that define standard cells in the table. This tag is also commonly referred to as the <tr> element.

Example:

<body>

<table>

<tr>

<th>Item</th>

<th>Amount</th>

</tr>

<tr>

<td>Grapes</td>

<td>$18</td>

</tr>

<tr>

<td>Apples</td>

<td>$4</td>

</tr>

<tr>

<td>Pears</td>

<td>$7</td>

</tr>

</table>

</body>

Sample Output:

refer the attachment

Attachments:
Similar questions