Thursday, August 15, 2024
HomeProgrammingHow are the `colspan` and `rowspan` attributes completely different?

How are the `colspan` and `rowspan` attributes completely different?


Sure, sure. Functionally, they’re completely different. However heck if I didn’t know concerning the wacky thresholds till Jens Oliver Meiert tooted a pair of fast polls.

In line with the HTML Commonplace:

  1. If the present cell has a colspan attribute, then parse that attribute’s worth, and let colspan be the consequence.
    If parsing that worth failed, or returned zero, or if the attribute is absent, then let colspan be 1, as a substitute.
    If colspan is larger than 1000, let it’s 1000 as a substitute.
  2. If the present cell has a rowspan attribute, then parse that attribute’s worth, and let rowspan be the consequence.
    If parsing that worth failed or if the attribute is absent, then let rowspan be 1, as a substitute.
    If rowspan is larger than 65534, let it’s 65534 as a substitute.

I noticed the solutions upfront and know I’d have flubbed rowspan. Apparently, 1000 desk columns are loads of columns to span without delay, whereas 65534 is the magic quantity for clamping what number of rows we will span at a time. Why is the candy spot for rowspan 6,4543 spans higher than colspan? There are normally good causes for this stuff.

What that motive is, darned if I do know, however now I’ve a little bit nugget for cocktail chatter in my again pocket.


How are the `colspan` and `rowspan` attributes completely different? initially printed on CSS-Tips, which is a part of the DigitalOcean household. You must get the publication.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments