View Single Post
Old 07-04-2012, 11:00 PM   #1
spinxwebdesign
Registered User
 
Join Date: Jun 2010
Posts: 269
<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..
spinxwebdesign is offline   Reply With Quote