Figure Element (fig)
The fig element creates a container for visual elements like images, diagrams, or other visual content along with their associated metadata and descriptions. It's suitable for both simple images and complex visual presentations with detailed accessibility information.
The fig element serves these primary purposes:
-
Organizing visual content with proper semantic structure and accessibility metadata
-
Providing a container for images, diagrams, and other visual elements with titles and descriptions
Key characteristics of the fig element:
-
Contains visual content elements such as
image,object, orcodeblock -
Supports optional
titleanddescelements for identification and detailed information -
Can be nested within other block elements and topics
-
Provides semantic meaning that distinguishes visual content from surrounding text
A fig element consists of these optional and required elements:
- Title (
title) - An optional element that provides a caption or heading for the figure. When present, it helps identify the purpose or content of the figure. When figure is linked to, title becomes the link text.
- Description (
desc) - An optional element that provides a longer description of the figure following the title.
- Image (
image) - A common child element that references graphic files. Contains required
hrefattribute pointing to the image file and optionalaltelement that provides alternative text for screen readers and accessibility compliance. - Object (
object) - An optional element for embedding multimedia content, interactive elements, or other objects that cannot be represented as simple images.
- Code block (
codeblock) - An optional element for displaying formatted code examples or technical content with syntax highlighting and proper formatting.
Content within the fig element typically follows these output formatting rules:
-
Figures are typically rendered as distinct visual blocks that start from a new line and are separated from surrounding text
-
Titles, when present, typically appear above or below the visual content in distinctive formatting
-
Supports automatic numbering and cross-referencing in many output formats
-
Can be presented with borders, backgrounds, or other visual styling to distinguish from regular content
Use fig instead of inline images (image) to:
-
Present images that require titles, captions, or detailed descriptions
-
Create referenceable visual content that can be cross-referenced from other parts of the document
-
Ensure proper accessibility compliance with alternative text and descriptions
-
Group related visual elements together in a semantic container
-
Present complex visual content like diagrams, charts, or technical illustrations
The fig element with an image element added to a concept topic in the Heretto CCMS Content Editor.
The DITA source of the fig element with the surrounding context of a concept:
<concept id="concept-3667" xml:lang="en-us">
<title>Hario V60 Method</title>
<abstract>
<shortdesc>The Hario V60 pour-over method produces a single cup of balanced coffee through precise brewing techniques.</shortdesc>
<p>The simple but effective design of V60 makes it perfect for brewing coffee at the office. Its cone shape and special ridges help create consistently good coffee, and it's easy to adjust the brewing to match personal taste. By paying attention to basics like coffee grind size, water temperature, and how you pour the water, you can make coffee that brings out all the flavors in your coffee beans.</p>
</abstract>
<prolog>
<author translate="no" type="creator">Heretto User <user@heretto.com></author>
</prolog>
<conbody>
<fig>
<title>V60 Pour-over Setup</title>
<desc>
<p>The proper setup of a V60 pour-over coffee maker, including filter placement and vessel positioning.</p>
</desc>
<image href="V60_Setup.png">
<alt>V60 dripper placed on a ceramic carafe with a paper filter inserted</alt>
</image>
</fig>
</conbody>
</concept>