Quote:
Originally Posted by Tex2002ans
Side Note: But I've had trouble with <caption> across devices in the past, especially trying to move to top/bottom using CSS's caption-side. See my posts in:
Personally, I still use an external <div> and/or <p>:
Code:
<p class="tabletitle"></p>
<table></table>
<div class="caption">
<p class="caption"></p>
</div>
(If more is needed, you could wrap the entire title+table+caption in an extra <div> similar to a <figure>.)
This:
- allows me to place it exactly where it's needed
- + it won't break across devices.
Yes, it doesn't get some of those Accessibility goodies with full HTML markup, but it works across everything...
- - -
You don't have to use <br/>.
You can use all the fancy markup you want inside of a <caption>... <p>, <span>, <i>/<em>, whatever.
It's the same as a <td> or <th>. You can use those tags bare, or you could stick extra markup inside those cells...
<caption> is a confusing/poor name for it now.
In HTML5, it seems like <caption> is intended to be used only as a "Title" of the table.
Then HTML5 promotes using <figure> + <figcaption> for an actual caption (or other info).
For example:
Code:
<figure>
<table>
<caption>LSAT-560467-S</caption>
[... Rest of table here...]
</table>
<figcaption>
<p class="caption">* An actual caption with extra info goes here.</p>
</figcaption>
</figure>
- - -
Side Note #1: Similar to me avoiding <caption>, I wouldn't be using much <figcaption> either...
See my post in:
Older devices wouldn't be able to render the markup well, so you might get odd bugs.
|
Well, I don't use <br/> in a caption because I'd never use caption or figcaption either. I'd use div and p, if indeed I had to use a table at all. Fortunately I'm not involved with other than novels which would very rarely need a table.