This site is mobile accessible. Press the "Tap Here" button to use a smaller font-size.
Smartphone icons created by Freepik - Flaticon
The width and height of a table are defined by the
and properties. The example below sets the width of the table to 100%, and the height of the <th> elements to 70px:First name | Last name | Savings |
---|---|---|
Peter | Griffin | $100 |
Lois | Griffin | $150 |
Joe | Swanson | $300 |
table { width: 100%; } th { height: 70px; }
To create a table that should only span half the page, use
First name | Last name | Savings |
---|---|---|
Peter | Griffin | $100 |
Lois | Griffin | $150 |
Joe | Swanson | $300 |
table { width: 50%; } th { height: 70px; }