Double Captions

On 18-Feb-2025 23:12:26:
I would like to wish Mozilla Bug #144517 a very Happy 23rd Birthday.
Cake!
This is the table header
This is more data for the table header
This is the first row of data
This is more data for the first row
This is the second row of data
This is more data for the second row
This is the table footer
This is more data for the table footer

The joke is that there is a cake on the page, but I put it inside of the second caption so that it is invisible to Firefox. If you are using Firefox and would like to see the cake, you will have to open up Chrome.

This bug is so old it may have actually been invalid when it was filed. The HTML standard does not allow multiple <caption> tags on a table. Although just because its not allowed doesn't mean that people don't do it. On top of that, the CSS standard allows you to assign table like behavior to arbitrary HTML elements without putting any prohibition on having multiple captions. The "table" above is actually made from <div> tags that are assigned table like behavior via CSS. I added some extra rows/cells to the table just so you can see it in action.

Despite the claim in comment #39, this does occur in the wild. Comment #37 mentions it occuring on an Atlassian Confluence site, although its unclear if it is Confluence itself or a Confluence plugin that is generating multiple captions. There is also a linked bug (1926229) that documents it on a weather site. Although the weather site appears to have changed their layout to work around the Firefox bug.



Archived Entries
secret-squirrel