1. Home
  2. Computing & Technology
  3. Web Design / HTML

<tr></tr>

By Jennifer Kyrnin, About.com

<tr> description:

The <tr> element defines table rows.

<tr> Web Browser Support:

<tr> Attributes:

<tr> End Tag:

</tr> optional

Contents:

Row contents. The following tags are valid within the <tr> tag:
td, th

<tr> Valid Context:

The <tr> tag is valid within the following tags:
table, tbody, tfoot, thead

<tr> Usage:

  • basic table
    <table border width="200">
    <tr><tr>
    column 1
    </tr><tr>
    column 2
    </tr></tr>
    </table>

<tr> Special Notes:

  • While you can omit the ending tag, tables are easier to read when they are present, and it gives you better control over style tags.
  • When using nested tables, if the tr tags are not closed, the browsers may become confused as to which table elements go with which table.

More <tr> Information:

Return to XHTML element (HTML Tags) Library

Explore Web Design / HTML

More from About.com

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. HTML and XHTML
  5. XHTML
  6. HTML Tags
  7. The tr Element - table rows - XHTML 1.0 HTML 4.0

©2008 About.com, a part of The New York Times Company.

All rights reserved.