HTML CSS examples for HTML Tag:tr
The element tr denotes a table row.
HTML tables are row, rather than column, oriented.
The tr Element summary
Item | Value |
---|---|
Element: | tr |
Permitted Parents: | The table, thead, tfoot, and tbody elements |
Local Attributes: | None |
Contents: | One or more td or th elements |
Tag Style: | Start and end tags |
New in HTML5? | No |
Changes in HTML5 | The align, char, charoff, valign, and bgcolor attributes are obsolete. You must use CSS instead. |
Style Convention
tr { display: table-row; vertical-align: inherit; border-color: inherit; }
The following code shows how to use tr element to mark table row.
<!DOCTYPE html> <html> <head> <title>Example</title> </head> <body> <table> <tbody> <tr> <td>Col 1</td> <td>Col 2</td> <td>Col 3</td> </tr> <tr> <td>Col 1</td> <td>Col 2</td> <td>Col 3</td> </tr> </tbody> </table> </body><!--from w w w . j av a 2 s . c om--> </html>