Text Content

HTML <figcaption> element

Provides a caption for a figure. It belongs as the first or last child of that figure. The caption describes the associated figure as a unit. Do not use it as a replacement for an image's text alternative when the image conveys information that the caption does not. It accepts global HTML attributes; individual global features may be inapplicable or restricted.

Formal Syntax & Structure

html syntaxhtml
<figcaption>Caption</figcaption>

Return Value

HTMLElement

Content model: Flow content; context-specific ancestor restrictions may apply.

Working Example

Example Snippethtml
<!doctype html><html lang="en"><head><meta charset="utf-8"><title>HTML example</title></head><body><figure><pre>North → East</pre><figcaption>Direction diagram</figcaption></figure></body></html>
HTML Reference