Learnerslesson
   JAVA   
  SPRING  
  SPRINGBOOT  
 HIBERNATE 
  HADOOP  
   HIVE   
   ALGORITHMS   
   PYTHON   
   GO   
   KOTLIN   
   C#   
   RUBY   
   C++   
   HTML   
   CSS   
   JAVA SCRIPT   
   JQUERY   




HTML - Figcaption Tag


The figcaption tag or <figcaption> tag in HTML is used to define a caption for the contents of the figure tag.


Why do we need Figcaption Tag in HTML?


As explained above, figcaption tag is used with the figure tag to provide a caption for the figure.


Let us illustrate figcaption tag with the below example.


Example :



<html>
<body>
	<figure>
		<img src = "my_image.png" height="200px" width = "300px"/>
		<figcaption>To illustrate figcaption</figcaption>
	</figure>	
</body>
</html>


Output :




So, if you look at the above code. The figcaption tag is used with the figure tag to provide a caption for it.


<figure>
	<img src = "my_image.png" height="200px" width = "300px"/>
	<figcaption>To illustrate figcaption</figcaption>
</figure>