From the course: HTML Essential Training
Unlock this course with a free trial
Join today to access over 24,700 courses taught by industry experts.
HTML tables
- In the '90s and early 2000s, tables were commonly used to create page layouts. But since then, new improvements to HTML and CSS have made this practice outdated, though you may still see it being used on old websites. Today, tables are mainly used for organizing data in rows and columns, like a price list or a comparison chart. One exception is HTML emails where tables are still needed for layouts. Let's take a look at the different parts that make up a basic HTML table. All forms start with a table tag. The caption element is optional, but can be added to provide a brief description of the table's contents. The rows in a table are created using the tr tag. The th tag is used for table headers. They're usually added as the first row to create a header for each column. To add data to the rows, use a td tag. Let's open an example in CodePen to see what a basic table looks like. By default, the data is displayed in rows and columns. Each piece of table data appears in its own box…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
The basic HTML document4m 20s
-
(Locked)
Structuring content, part 15m 23s
-
(Locked)
Structuring content, part 22m 46s
-
(Locked)
Exercise: Structuring content6m 47s
-
(Locked)
HTML tables3m 22s
-
(Locked)
Exercise: Create an HTML table2m 50s
-
(Locked)
The Document Object Model1m 8s
-
(Locked)
Challenge: Add structural elements to project2m 7s
-
(Locked)
Solution: Demo5m 46s
-
(Locked)
-
-
-
-
-
-