View Figcaption Over Image Pictures. Instantly share code, notes, and snippets. If you need to add more semantics to an image, you can use elements such as h1 and p. By changing a css variable with media queries, the labels can adjust to a wide variety of screen sizes.
The figcaption content may be a text alternative for the image, preventing the need for a text alternative provided using the alt attribute.
The figcaption element represents a caption or legend for a figure. Sadly enough, there is no markup for image captions in html, unless you count the figcaption. The html figcaption or figure caption element represents a caption or legend describing the rest of the contents of its parent figure element. The figcaption content may be a text alternative for the image, preventing the need for a text alternative provided using the alt attribute. What an figcaption element can contain. By changing a css variable with media queries, the labels can adjust to a wide variety of screen sizes. If you need to add more semantics to an image, you can use elements such as h1 and p. In short the image is horizontally aligned, not the image and caption together!

