Re: Captions
Posted by
GregChapman on
Apr 02, 2012; 12:07am
URL: https://support.nabble.com/Captions-tp7418606p7427776.html
You could, but not only is that code is significantly more complex - there are many more tags that are not needed for any styling purpose - and, as you point out, there is further unseen class code to be added, but also the code is technically inappropriate, as an image and caption isn't tabular in nature. It's just an image followed by some text.
(Many web authors show their word processing origins by using tables for page layout. There's no need to copy them! In HTML the tag should only be used for tabular data. The techniques Hugo and I are suggesting are distinctly better, making documents more accessible for the visually impaired and blind, for example.)
I thought my solution, offered earlier, was pretty straight forward:
<p class="caption">< img here >caption text</p>
Why make things complicated? It could be done without a class, if it is that that scares you, in the way Hugo suggests. You just replace 'class="caption"' with 'style="listofrules:here;"'.
Hugo's suggestion is equally valid. The only difference being that he places the caption in a separate tag rather than within the paragraph that holds the image. Both work and offer a simple solution to the provision of a caption. Why look further?
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.