Home >>HTML5 Tutorial >HTML5 <figcaption> tag

HTML5 <figcaption> tag

HTML < figcaption> tag

The < figcaption> element is used to provide a caption to the figure element in a document. < figcaption> element is new in HTML5.

Only a < figcaption> element can be nested within a <figure> tag. <figure> element also contain the multiple other element such as <img> or <code>.

You can use the <figure> element to markup a photo in a document.

Let's take an Example of figcaption tag:

<!DOCTYPE>
<html>  
<body>  
<figure>  
<img src="https://abhibuscommunity.com/wp-content/uploads/2018/01/delhi-red-fort.jpg" alt="Taj Mahal" width="250"/>  
<figcaption>Fig.1.1 - Front view of the Red Fort in Delhi.</figcaption>  
</figure>  
</body>
</html>  
Output:
Taj Mahal
Fig.1.1 - Front view of the Red Fort in Delhi.

No Sidebar ads