The best HTML <colgroup> tag Tutorial In 2024, In this tutorial you can learn Examples,Browser Support,Tag definitions and instructions,Differences between HTML 4.01 and HTML5,Attributes,Global Properties,Event Properties,
<Colgroup> and <col> tag for the three columns in the table set the background color:
All major browsers support <colgroup> tag.
<Colgroup> tag is used to form the columns in combination, in order to format it.
By using the <colgroup> tag, you can apply a style to an entire column, rather than requiring repeated for each cell in each row or set the style.
Note: Only in the <table> element of, after any <caption> element at any one <thead>, <tbody>, <tfoot>, before <tr> element uses <colgroup> tag.
Tip: If you want to <colgroup> in a column to define different properties, use within <colgroup> tag <col> tag.
HTML5 no longer supported in HTML 4.01 in most of the properties.
属性 | 值 | 描述 |
---|---|---|
align | left right center justify char |
HTML5 不支持。规定在列组合中内容的水平对齐方式。 |
char | character | HTML5 不支持。规定根据哪个字符来对齐列组中的内容。 |
charoff | number | HTML5 不支持。规定第一个对齐字符的偏移量。 |
span | number | 规定列组应该横跨的列数。 |
valign | top middle bottom baseline |
HTML5 不支持。定义在列组合中内容的垂直对齐方式。 |
width | pixels % relative_length |
HTML5 不支持。规定列组合的宽度。 |
<colgroup> tag supports HTML global properties .
<colgroup> tag supports HTML event properties .