Explain the use of <tr>tag with an example.
Share
Explain the use of <tr>tag with an example.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
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