HTML:- figcaption

<!DOCTYPE html>
<html>

<head>
 <meta name="viewport" content="width=device-width, initial-scale=1">
 <title>figcaption</title>
</head>

<body>

 <!-- Just a figure -->
 <figure>
  <img src="dymond.jpg" alt="An awesome picture">
 </figure>
 <p></p>
 <!-- Figure with figcaption -->
 <figure>
  <img src="dymond.jpg" alt="An awesome picture">
  <figcaption>Fig1.Dymond</figcaption>
 </figure>
 <p></p>
</body>

</html>




Output:-  An awesome picture
An awesome picture
Fig1.Dymond



Definition:-  

Figure tag


  • The HTML 'figure' element represents self-contained content, frequently with a caption 'figcaption'.
  • The 'figcaption' element is optional and can appear before or after the content within the 'figure' tag.
  • Only one 'figcaption' element may be nested within a 'figure' , although the 'figure' element itself may contain multiple other child elements (e.g., img or code)
  • The 'figcaption' element can be placed as the first or last child of the 'figure' element.
HTML:- figcaption HTML:- figcaption Reviewed by Network security on April 30, 2019 Rating: 5

No comments:

Useful Information

Powered by Blogger.