<Figure> Element of HTML5
Earlier, there is not any easy or semantic way to relate the caption with the Image element itself. We need to use <P> to connect caption with the Image element. But now with HTML5, we can do this. HTML5 offers remedy for this with the introduction of the <figure> element. <figure> element comes with the <figcaption> element and that is used to relate captions with their image counterparts. See below example:
<figure>
<img src="image_path" alt="About the image" />
<figcaption>
<p>Something interesting about the image. </p>
</figcaption>
</figure>
Last edited by spinxwebdesign; 09-07-2012 at 04:57 AM..
|