HTML TR Tag || TR Tag in HTML
×

HTML TR <tr> Tag

0 582

HTML TR <tr> tag is used to define the rows (table row) in the table. The <tr> tag can consist one or more <th>, <td> cells to define a single row of HTML table.

The <tr> tag must be a direct child of <table> element or it can be nested child of <thead>, and <tfoot>tag.

Syntax:

<tr> .... ... </tr>

Program:

<!DOCTYPE html>
<html>
<head>
<title>TR tag</title>
</head>
<body>
<h2>Example of TR Tag</h2>
<table>
 <tr>
  <th>Month</th>
  <th>Savings</th>
 </tr>
 <tr>
  <td>January</td>
  <td>$500</td>
  </tr>
</table>
</body>
</html>

Output:




Share:


Leave a Reply


Comments
    Waiting for your comments