Easy learning with example program codes

Figcaption HTML

HTML <figcaption> Tag

To provide a caption to an image, the HTML <figcaption> tag is used. It is placed either before or after the content within the <figure> tag, thus can be placed either as the first child or the last child of the <figure> element, but it is not mandatory to be used with the <figure> tag. Within a <figure> tag, only one <figcaption> element can be nested.


<!DOCTYPE html>
    <img src="img.jpg" alt="Fly" width=300 height=200>
    <figcaption>Fig.1 - Fly high in the sky.</figcaption>



In the above example, we are using the HTML <figcaption> tag, to provide a caption to an image.

Global Attributes:

The Global attributes are supported by the HTML <figcaption> tag.

Event Attributes:

The Event attributes are supported by the HTML <figcaption> tag.

Supporting Browsers:

Chrome, IE, Firefox, Opera and Safari.

Please follow and like us:
Posted in HTML   

Copyright © 2020 CodesJava Protection Status