I have what seems to be a simple question: I have a table that I am making as an accessible friendly element, including using the <caption>
tag for the table title. This is all fine, but my element titles are styled into a ribbon which has the following structure:
<div class="ribbon"><h2></h2></div>
I have read that the caption for the table must come directly after opening the table tag, so my question is: can I wrap my caption in a div and it still be interpreted as a valid caption for a table like so?
<div class="ribbon"><caption>Title Here</caption></div>
div
for? Can you apply your style (or id) to thecaption
tag instead><caption><span>Title</span></caption>
would that be valid? All I need is 2 block elements, the styling can be applied to whatever.