HTML5 has a nice “figure” and “figurecaption” tags, for images. Like this:
<figure> <img src="../i/lilies-s.png" alt="lilies" width="167" height="106"> <figcaption>lilies</figcaption> </figure>
By spec, the “figurecaption” tag should be either the first or last element of the “figure” tag.
Test if you browser support it here: HTML5 figure figurecaption test page.
Of all latest publically released browsers as of today () for Windows, Safari (5.0.4) and Opera (11.01) doesn't support it. Google Chrome (10.0.648.151), Firefox 4.0, IE9, all support it.
As of , now Opera 11.50 also supports it. Now just Windows Safari 5.0.5 doesn't.
As of , all latest versions of major browsers supports it. Safari 5.1 now supports it.
Back to HTML5 Tags.