<tr> Table row tag in HTML - HTML Tutorial

 table tag

Tablerow tr tag in html

  • The table row <tr> specifies a row of cells in a table.
  • These can be combine of <td> and <th> elements.
  • The <tr> tag supports Global Attributes and Event Attributes.

Syntax for <tr> tag in HTML:


Differences between HTML 4.01 and HTML 5 for <tr> tag:

HTML 4.0.1

  • align, bgcolor, char, charoff, valign attributes are supported.


  • All layout attributes are removed.

Sample Coding for <tr> tag:

Tryit<!DOCTYPE html>
<html >
        <table border=1>

Code Explanation for <tr> tag:

Table Row <tr> Tag Code Explanation

  1. <tr> tag - is used to create row in the table.
  2. Firstname and Lastname is defined in the table header with in the row tag.

Output for <tr> tag in HTML:

Table Row <tr> Tag Output

  1. Here the output shows Firstname and Last name is displayed in row.

Attributes of <tr> tag:

Attribute Value HTML 4 HTML5 Description
align left
Yes No Provides the alignment of the content.
valign top
Yes No Describes the alignment of the content in vertical.
char character Yes No Defines the content alignment relevant to a character.
charoff number Yes No Provides the number of characters.
bgcolor rgb(x,x,x)
Yes No The background color of a cell

Browser Support for <tr> tag in HTML:

Yes Yes Yes Yes Yes

Related Searches to table row tr tag in html

Adblocker detected! Please consider reading this notice.

We've detected that you are using AdBlock Plus or some other adblocking software which is preventing the page from fully loading.

We don't have any banner, Flash, animation, obnoxious sound, or popup ad. We do not implement these annoying types of ads!

We need money to operate the site, and almost all of it comes from our online advertising.

Please add wikitechy.com to your ad blocking whitelist or disable your adblocking software.