Are these codes logically equivalent?
And
From the 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
I read that as saying that just
on its own is invalid but this:
is valid and the same as:
However, if the
children:
If the colgroup element contains no col elements, then the element may have a span content attribute specified...
My interpretation (based on the HTML4 specification more than the thinner HTML5 one) is that you would usually use
unless you needed to style one of the columns in the group differently as in this (modified) example from the HTML4 specification:
so the first 39 columns would use whatever the
specifies but the 40th could be tweaked. OTOH, I'm having trouble getting browsers to pay much attention to any of this (despite what the specs say) on jsfiddle.net so YMMV.