You are currently using a web browser that does not support HTML 5 with style sheets. Please try the standard HTML 5, XHTML 1 or XHTML 1 Mobile version of this page instead.

The <tr> Table Row Tag

The <tr> table row tag in HTML 5

<tr> Tag Syntax

Syntax of the <tr> tag

Attributes of the <tr> Table Row Tag

Attributes of the <tr> table row tag

attribute
The attribute
common attributes
In addition to the attributes above, which are specific to the <tr> tag, any of the common HTML attributes can also be used.
HTML 5 Examples

Examples of the tr tag in HTML 5


In HTML 5, you can turn a whole row of an HTML table into a link:

<table>
<tr><td>Label:</td><td>Data...</td></tr>
...
<tr onclick="location=this.getElementsByTagName('a')[0]">
<a href="new-row.html"/>
<td colspan="2">Add a Row</td>
</tr>
</table>
Changes in HTML 5

What's new in HTML 5

Differences between HTML 5 and earlier versions

The following attributes should not be coded on the <tr> tag because they either have been deprecated or were never officially supported:

  • bgcolor

Last updated Saturday September 12, 2009


Printer-friendly PDF* format:

HTML <tr> Tag

You are currently viewing this page in HTML 5 Style Sheet* format (* see Clicklets for more infomation). This document is also available in HTML 5 XML*HTML 5 non-XML*XHTML 1 Style Sheet*XHTML 1*XML* HTML 4* XHTML Mobile* WML Mobile* and printer-friendly PDF* formats. This is accomplished with Single Source Publishing, a content management system that uses templates in XSLT style sheets provided by XML Styles .com to transform the source content for various content delivery channels. There is also RDF* metadata that describes the content of this document.