From the course: HTML: Tables
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Use colspan and rowspan
- [Instructor] Now that we've grouped some of these columns together and we're showing a relationship between this type of data what if we wanted to add a big label across the top of all of those rows? Like right now I've got some red columns and some blue columns, but it's not necessarily obvious as to why some are red and why some are blue. It might be really, really nice to have a label over top of all of those. And so let's go on ahead and add that now. So the way I'm going to do that is inside of my T head before I have all of this information about the headers for each one of those columns I'm just going to put in another row. So start with a TR, end with a /TR, and then inside of that I am going to map out a row for those particular labels. So in that particular case we're going to start with a td. That is where the cell would go above item, but I don't actually need this cell. However, in order to keep all of my data lined up in this table I will have to put in basically what…
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)
Display data semantically2m 44s
-
(Locked)
Understand table rows and table data5m 13s
-
Add content and data to table cells4m 57s
-
(Locked)
Understand table headings2m
-
(Locked)
Identify table head, body, and foot5m 37s
-
(Locked)
Include table captions2m 32s
-
(Locked)
Group columns and apply to headers5m
-
(Locked)
Use colspan and rowspan4m 25s
-
(Locked)
Challenge: Mark up a table2m 42s
-
(Locked)
Solution: Mark up a table3m 49s
-
(Locked)
-
-
-