### Course Progress

0%

Videos Watched 0 / 9

### Lessons

- [1 - Introduction](/content/frontend/html-crash-course/html-introduction/index.html) FREE
- [2 - HTML Basics](/content/frontend/html-crash-course/html-basics/index.html)
- [3 - Semantic HTML](/content/frontend/html-crash-course/semantic-html/index.html)
- [4 - Essential HTML Tags](/content/frontend/html-crash-course/essential-html-tags/index.html)
- [5 - Tables](/content/frontend/html-crash-course/tables/index.html) FREE
- [6 - Forms](/content/frontend/html-crash-course/forms/index.html)
- [7 - Document Object Model](/content/frontend/html-crash-course/document-object-model/index.html)
- [8 - Accessibility](/content/frontend/html-crash-course/accessibility/index.html)
- [9 - Meta Tags](/content/frontend/html-crash-course/meta-tags/index.html)

## 5 - Tables

12 min

Tables are best used to organize your page layout!

Just kidding. Please don't ever use table layouts. This isn't 1996.

Tables from Clément Mihailescu on Vimeo

### Key Terms

- #### <table>

An HTML tag for representing data with rows and columns. As a general rule, anything that could go in a spreadsheet probably also makes sense in a <table>

There are a variety of tags associated with tables, with these being some of the most common:

- <tr>: A single row in the table.
  - <th>: A heading in the table. This should be used with the scope attribute of either row or col to choose what the content is a heading for.
  - <td>: A single piece of data in the table, also referred to as a cell.
  - <thead>: A grouping tag for the heading of a table, usually containing a single <tr> with column headings.
  - <tbody>: A grouping tag for the body of the table, used for containing the primary rows of data.
  - <tfoot>: A grouping tag for the footer of the table.
  - <caption>: A caption or title for the table.

For example, this is a valid HTML table:

```markup

```

[Learn more: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table)

[Lesson 4\ Essential HTML Tags](/content/frontend/html-crash-course/essential-html-tags/index.html)

[Lesson 6\ Forms](/content/frontend/html-crash-course/forms/index.html)
