<figure> Tag Syntax
<body> ... ... flow content expected ... <figure> <figcaption> ... flow content ... </figcaption> ... flow content ... </figure> ... ... flow content expected ... <figure> ... flow content ... <figcaption> ... flow content ... </figcaption> </figure> ... </body>
Rules for coding HTML figure
elements
Make sure you understand the difference between a tag and element and are familiar with the definitions of namespace and other HTML terms.
- Include a figure element where flow content is expected.
- Begin the figure element with a starting <figure> tag. The element name uses lower case letters and should be in the HTML namespace, which it will pick up automatically from the
xmlns
attribute on the <html> tag. - Inside the figure element, between the
<figure>
starting tag and the</figure>
ending tag, code the inner HTML flow content. This is often an image or possibly SVG or MathML. - End the figure element with a matching
</figure>
closing tag.
Content of the figure element
The content of the figure element can include HTML comments, text content and any tags that can be used in flow content.