Include a caption for a <figure> element in HTML5

HTMLWeb DevelopmentFront End Technology

To add a caption to a <figure> element, use the <figcaption> tag. You can try to run the following code to include a caption for a <figure> element in HTML5 −

<!DOCTYPE html>
<html>
   <head>
      <title>HTML figcaption Tag</title>
   </head>
   <body>
      <figure><img src = "https://www.tutorialspoint.com/videotutorials/images/tutorial_library_home.jpg"/>
         <figcaption>Tutorials Point Library of Tutorials</figcaption>
      </figure>
   </body>
</html>
raja
Published on 13-Mar-2018 11:41:29
Advertisements