Close this window

Using the <subfigure> tag

Description

The subfigure tag is used when you want to include multiple figures, tables, or blocks of code within a single figure tag. You should use the subfigure tag only if the subfigures are related and you want to display them together. The subfigure tag is similar to the figure tag, except that it cannot contain another subfigure tag.

Example

This CNXML:


<figure id="dogs-fig" orient="horizontal">
  <title>Some very cute dogs</title>
  <subfigure id="dogs-subfig1">
    <media id="dog-1"
           alt="A dog sitting on a bed">
      <image mime-type="image/jpeg" 
             src="image1.jpg" />
    </media>
  </subfigure>
  <subfigure id="dogs-subfig2">
    <media id="dog-2"
           alt="A dog looking on">
      <image mime-type="image/jpeg" 
             src="image2.jpg" />
    </media>
  </subfigure>
</figure>
        

Results in this display:

Figure 1
Some very cute dogs
(a) (b)
A dog sitting on a bed A dog looking on

Attributes(what's this?)

Children(what's this?)

First, subfigure may contain an optional label tag, followed by an optional title tag. Next, it must contain: Finally, figure may contain an optional caption tag.

Parents(what's this?)

figure
Close this window