课程: HTML: Tables

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Use colspan and rowspan

Use colspan and rowspan - HTML教程

课程: HTML: Tables

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…

内容