---
title: Tables
---
### Defining an HTML Table
An HTML table is defined with the `
` tag.
Each table row is defined with the `` tag. Inside a row there may be table headers or table data.
* A table header is defined with the `` tag. By default, table headings are bold and centered.
* A table data/cell is defined with the ` | ` tag.
A more complex HTML table may also include ``, ``, ``, ``, ` |
`, and `` elements in it.
### Simple Table Example
```html
Firstname |
Lastname |
Age |
Jill |
Smith |
50 |
Eve |
Jackson |
94 |
```
DEMO
### Table Example with more semantic information
```html
Item |
Amount |
Apple |
10 |
Peach |
15 |
Watermelon |
3 |
```
Result:
Item |
Amount |
Apple |
10 |
Peach |
15 |
Watermelon |
3 |
## Adding/Removing table border
The table border width can be increased/decreased using the table border attribute.
### Table Border Example
```html
```
Result:
```html
```
Result:
```html
```
Result:
#### More Information:
MDN Article on the HTML