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.
Element | |||||
---|---|---|---|---|---|
Yes | Yes | Yes | Yes | Yes |
Month | Savings |
---|---|
January | $100 |
How to add background-color to a table row (with CSS):
Month | Savings |
---|---|
January | $100 |
Month | Savings |
---|---|
January | $100 |
How to create table headers:
Name | Phone | |
---|---|---|
John Doe | john.doe@example.com | 123-45-678 |
How to create a table with a caption:
Month | Savings |
---|---|
January | $100 |
February | $80 |
How to define table cells that span more than one row or one column:
Name | Phone | ||
---|---|---|---|
John Doe | john.doe@example.com | 123-45-678 | 212-00-546 |
If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com
If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com
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.