Search code examples
htmlterminologyfigureself-contained

What does "self-contained" mean?


I’ve read the definition of figure:

The figure element represents a unit of content, optionally with a caption, that is self-contained, that is typically referenced as a single unit from the main flow of the document, and that can be moved away from the main flow of the document without affecting the document’s meaning.

But I still don’t understand the “self-contained” part. Could anyone clarify it please?


Solution

  • From the W3.org:

    The figure element represents some flow content, optionally with a caption, that is self-contained (like a complete sentence) and is typically referenced as a single unit from the main flow of the document.

    Self-contained in this context does not necessarily mean independent. For example, each sentence in a paragraph is self-contained; an image that is part of a sentence would be inappropriate for figure, but an entire sentence made of images would be fitting.

    The element can thus be used to annotate illustrations, diagrams, photos, code listings, etc.