From the course: HTML: Tables

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

Group columns and apply to headers

Group columns and apply to headers - HTML Tutorial

From the course: HTML: Tables

Start my 1-month free trial

Group columns and apply to headers

- [Instructor] If you've noticed our data, you'll see that we have some retail prices and some case prices for our products. We may want to group these columns to show a relationship between these kinds of prices. The way to do this is with a combination of a col group tag, and the col tag. And that's going to spell out a model that we can then apply to the actual HTML tags that make up our table. It's kind of like a model that runs on top of that code. So, we'll start with the col group tag, and that should be placed just after the caption and before any T head that you have there in the document. And we'll go ahead and put it in this way. We have col group. And then, of course a slash col group. And then in between the col group tags, we're going to put in a series of tags that are simply col. And we need to account for seven columns because that's what we have spelled out in the rest of the document. And, so, we have to have at least seven of these cols in one form or another. So…

Contents