Figure

A figure is a container for a variety of objects, including artwork, images, code samples, equations, and tables.

Syntax

XDITA

<fig>

HDITA

<figure>

MDITA (core and extended profiles)

There is no specific syntax for figure in MDITA.

Usage information

A <fig> component enables associating other components, such as a title or description, with the contents of the figure component.

Attributes

The available attributes vary based on the authoring format:

XDITA
The following attributes are available on this element: display attributes, link relationship attributes, localization attributes, universal attributes, and @props.
HDITA
The following attributes are available on this element: link relationship attributes, localization attributes, universal attributes, and @props.
MDITA
There is no attribute support for the MDITA core profile. For the MDITA extended profile, attributes can be specified by using the HDITA representation.

Examples

This section is non-normative.

Example 1. XDITA example

The following example demonstrates the use of figure in an XDITA topic.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD LIGHTWEIGHT DITA Topic//EN" "topic.dtd">
<topic id="intro-product">
  <title>Remote Lighting Overview</title>
  <body>
    <p>The Remote Lighting Network kit includes a wireless smart system that helps make the lighting in your home more energy efficient and easier to manage.</p>
    <fig>
      <image href="images/kit-package.jpg"><alt>Retail package for the Remote Lighting Network kit </alt></image>
    </fig>
  </body>
</topic>
Example 2. HDITA example

The following example demonstrates the use of figure in an HDITA topic.

<!DOCTYPE html>
<html>
<head>
  <title>Home</title>
</head>
<body>
  <article id="intro-product">
    <h1>Remote Lighting Overview</h1>
    <p>The Remote Lighting Network kit includes a wireless smart system that helps make the lighting in your home more energy efficient and easier to manage.</p>
    <figure>
      <img src="images/kit-package.jpg" alt="Retail package for the Remote Lighting Network kit" />
</figure>
  </article>
</body>
</html>