Yes, yes. Functionally, they are different. But heck if I didnโt know about the wacky thresholds until Jens Oliver Meiert tooted a pair of quick polls.
According to the HTML Standard:
- If theย current cellย has aย
colspan
ย attribute, thenย parse that attributeโs value, and letย colspanย be the result.
If parsing that value failed, or returned zero, or if the attribute is absent, then letย colspanย be 1, instead.
Ifย colspanย is greater than 1000, let it be 1000 instead.- If theย current cellย has aย
rowspan
ย attribute, thenย parse that attributeโs value, and letย rowspanย be the result.
If parsing that value failed or if the attribute is absent, then letย rowspanย be 1, instead.
Ifย rowspanย is greater than 65534, let it be 65534 instead.
I saw the answers in advance and know Iโd have flubbed rowspan
. Apparently, 1000
table columns are plenty of columns to span at once, while 65534
is the magic number for clamping how many rows we can span at a time. Why is the sweet spot for rowspan
6,4543 spans greater than colspan
? There are usually good reasons for these things.
What that reason is, darned if I know, but now I have a little nugget for cocktail chatter in my back pocket.
How are the `colspan` and `rowspan` attributes different? originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.
[fluentform id="8"]