HTML <tr> tag

You are Here:

HTML <tr> tag

The <tr> tag specifies a row in an HTML table.

A <tr> element contains one or more <th> (Header cell) or <td> (Data cell) elements.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <table> <tr> <th>S.No</th> <th>Name</th> </tr> <tr> <td>1</td> <td>Brendan</td> </tr> <tr> <td>2</td> <td>Eich</td> </tr> </table> </body> </html>

Attributes

There is no special attributes for <tr> tag. Only Global attributes.

Deprecated Attributes

The following attributes should not be used in any case.

AttributeValueExplanation
align
  • left
  • center
  • right
  • justify
  • char
Specifies how to align the content inside the <tr> element.
bgcolor
  • color name
  • #RRGGBB
Specifies the background color of the table row.
charcharacterSpecifies a character to align the content inside <tr> element.
charoffnumberSpecifies the number of characters to offset the <tr> data from the alignment characters specified by the char attribute.
valign
  • baseline
  • bottom
  • middle
  • top
Specifies the vertical alignment of the <tr> content.

Reminder

Hi Developers, we almost covered 99.5% of HTML Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in HTML.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author