HTML Tag

A simple HTML table with three rows; one header row and two data rows:














Month Savings
January $100
February $80

More "Try it Yourself" examples below.

Definition and Usage

Browser Support

Element
Yes Yes Yes Yes Yes

Global Attributes

Event Attributes

More Examples

Example










Month Savings
January $100

Example

How to add background-color to a table row (with CSS):










Month Savings
January $100

Example










Month Savings
January $100

Example

How to create table headers:












Name Email Phone
John Doe john.doe@example.com 123-45-678

Example

How to create a table with a caption:















Monthly savings
Month Savings
January $100
February $80

Example

How to define table cells that span more than one row or one column:













Name Email Phone
John Doe john.doe@example.com 123-45-678 212-00-546

Related Pages

Default CSS Settings

tr <
display: table-row;
vertical-align: inherit;
border-color: inherit;
> W3schools Pathfinder Track your progress - it's free!

Get Certified

COLOR PICKER

colorpicker

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com

Top Tutorials
Top References
Top Examples
Get Certified

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning.
Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness
of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.