HTML Tags

HTML <tr> Tag

The <tr> tag in HTML defines a table row.
It is used inside the <table> element to group one or more table cells (<th> or <td>) in a single horizontal row.

Syntax

<tr>
  <td>Cell 1</td>
  <td>Cell 2</td>
</tr>

Attributes

AttributeDescription
alignSpecifies the horizontal alignment of content in a row (deprecated).
bgcolorSpecifies the background color of a row (deprecated).
valignSpecifies the vertical alignment of content in a row (deprecated).

⚠️ These attributes are deprecated. Use CSS instead for layout and styling.

Example

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>HTML tr Tag Example</title>
</head>
<body>
  <h2>Example of the &lt;tr&gt; Tag</h2>
  <table border="1">
    <tr>
      <td>January</td>
      <td>$100</td>
    </tr>
    <tr>
      <td>February</td>
      <td>$150</td>
    </tr>
  </table>
</body>
</html>

Output

Browser Output

Use our TryIt Editor to see the output

Browser Support

Chrome
Chrome
Firefox
Firefox
Edge
Edge
Safari
Safari
Opera
Opera
IE
IE9+
✅Yes✅Yes✅Yes✅Yes✅Yes✅Yes

All modern browser support <tr> html tag

Notes

  • A <tr> must be placed inside a <table>, <thead>, <tbody>, or <tfoot> element.
  • Each <tr> represents one row of table cells.
  • It can contain both <th> (header cells) and <td> (data cells).

Conclusion

  • The <tr> tag represents a single row in a table.
  • It is used within <table>, <thead>, <tbody>, or <tfoot> elements.
  • Each row contains one or more <th> or <td> cells.

In simple terms, the <tr> tag helps organize your table data horizontally — each <tr> creates one complete row of information, making your table more structured and readable.

Sign In Form

User your email and password to singn in

Don’t have an account, signup here : 

HTML5 & CSS3

Tools and Tutorials

Want a Website

Want a website for your business ?

Please fill out the details below, so we can reach out to you.

Registration Form

Signup to track your record and much more.

We have sent you an email with a registration link. Please click the link to verify your email address, or enter the 6-digit OTP provided in the email.

Didn't receive the OTP. Regenerate OTP Resend