从
specification for
:Contexts in which this element can be used:
As a child of a colgroup element that doesn’t have a span attribute.
[…]
Content attributes:
Global attributes
span
我读到的只是< col span =“7”/>它本身是无效的但是:
是有效的,同样如下:
If the colgroup element contains no col elements, then the element may have a span content attribute specified…
我的解释(基于HTML4 specification而不是更薄的HTML5)是你通常会使用< colgroup span =“n”>除非您需要以不同的方式设置组中的一个列,如HTML4规范中的此(修改)示例所示:
因此前39列将使用< colgroup>指定但是第40个可以调整. OTOH,我很难让浏览器在jsfiddle.net这么YMMV上关注这些(尽管规格说明).