View Single Post
Old 11-21-2022, 12:48 PM   #5
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 7,078
Karma: 91577715
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
Quote:
Originally Posted by enuddleyarbl View Post
It's interesting that neither the w3, mozilla, nor the spec, itself, specifically mentions that there can be only one:

https://www.w3schools.com/tags/tag_caption.asp
https://developer.mozilla.org/en-US/...lement/caption
https://html.spec.whatwg.org/multipa...aption-element

Reading the text closely enough implies it, but it would have been nice if they'd have mentioned it. Good catch.

Of course, it looks like you can put all kinds of formatting in the <caption></caption> pair.
They do not say "only one is allowed per table" but it is an obvious consequence of the statements of where a caption is allowed:

Quote:
The <caption> tag must be inserted immediately after the <table> tag.
Quote:
Permitted parents: A <table> element, as its first descendant.
Quote:
Contexts in which this element can be used: As the first element child of a table element.
jhowell is offline   Reply With Quote