xtml


SUBMITTED BY: maloans

DATE: March 6, 2017, 10 p.m.

FORMAT: Text only

SIZE: 1.2 kB

HITS: 863

  1. Grouping Columns Using the < c olgroup > Element I f two or more columns are related, you can use the <c olgroup> element to explain that those columns are grouped together. F or example, in the following table, there would be six columns. The first four columns are in the first column group, and the next two columns are in the second column group ( ch04_eg07.html) : <t able> <c olgroup span=”4” class=”mainColumns” /> < colgroup span=”2” class=”subTotalColumns” /> <t r > < td > 1< / td> <t d >2 < / td> < td >3 < / td > < td> 4< /td > < td> 5 < /td> <t d >6 </ td> </ tr > < /table > W hen the < c olgroup> element is used, it comes directly after the opening < t able> tag and carries a span attribute, which is used to indicate how many columns the group contains. In this example, the class attribute is used to attach CSS rules that tell the browser the width of each column in the group and the background color for each cell. You will learn more about CSS in Chapter 7, but it is worth noting that some browsers support only a subset of the CSS rules for this element.

comments powered by Disqus