image

Include artwork or images in a DITA topic by using the <image> element. The <image> element has optional attributes that indicate whether the placement of the included graphic or artwork should be inline (like a button or icon) or on a separate line for a larger image. There are also optional attributes that indicate the size to which the included graphic or artwork should be scaled. An href attribute is required on the image element, as this attribute creates a pointer to the image, and allows the output formatting processor to bring the image into the text flow. To make the intent of the image more accessible for users using screen readers or text-only readers, always include a description of the image's content in the alt element.

Example

<image href="bike.gif" placement="break"><alt>Two-wheeled bicycle</alt></image>

Contains

Doctype Content model
ditabase, topic, task, reference, concept, glossary, map, bookmap ( alt) (optional)

Contained by

Doctype Parents
bookmap data, title, shortdesc, desc, p, note, lq, sli, li, itemgroup, dthd, ddhd, dt, dd, fig, ph, stentry, draft-comment, fn, xref, entry, booklibrary, mainbooktitle, booktitlealt, organizationname
map data, title, shortdesc, desc, p, note, lq, sli, li, itemgroup, dthd, ddhd, dt, dd, fig, ph, stentry, draft-comment, fn, xref, entry
ditabase data, title, shortdesc, desc, p, note, lq, sli, li, itemgroup, dthd, ddhd, dt, dd, fig, ph, stentry, draft-comment, fn, xref, entry, abstract, body, section, example, linkinfo, conbody, prereq, context, cmd, info, tutorialinfo, stepxmp, choice, choptionhd, chdeschd, choption, chdesc, stepresult, result, postreq, refsyn, proptypehd, propvaluehd, propdeschd, proptype, propvalue, propdesc, glossterm, glossdef, uicontrol, pt, pd, imagemap
topic data, title, shortdesc, desc, p, note, lq, sli, li, itemgroup, dthd, ddhd, dt, dd, fig, ph, stentry, draft-comment, fn, xref, entry, abstract, body, section, example, linkinfo, uicontrol, pt, pd, imagemap
task data, title, shortdesc, desc, p, note, lq, sli, li, itemgroup, dthd, ddhd, dt, dd, fig, ph, stentry, draft-comment, fn, xref, entry, abstract, body, section, example, linkinfo, prereq, context, cmd, info, tutorialinfo, stepxmp, choice, choptionhd, chdeschd, choption, chdesc, stepresult, result, postreq, uicontrol, pt, pd, imagemap
concept data, title, shortdesc, desc, p, note, lq, sli, li, itemgroup, dthd, ddhd, dt, dd, fig, ph, stentry, draft-comment, fn, xref, entry, abstract, body, section, example, linkinfo, conbody, uicontrol, pt, pd, imagemap
reference data, title, shortdesc, desc, p, note, lq, sli, li, itemgroup, dthd, ddhd, dt, dd, fig, ph, stentry, draft-comment, fn, xref, entry, abstract, body, section, example, linkinfo, refsyn, proptypehd, propvaluehd, propdeschd, proptype, propvalue, propdesc, uicontrol, pt, pd, imagemap
glossary data, title, shortdesc, desc, p, note, lq, sli, li, itemgroup, dthd, ddhd, dt, dd, fig, ph, stentry, draft-comment, fn, xref, entry, abstract, body, section, example, linkinfo, conbody, glossterm, glossdef, uicontrol, pt, pd, imagemap

Inheritance:

- topic/image

Attributes

Name Description Data Type Default Value Required?
href The relative path or URL to the image. The href attribute uses conventional URL syntax to point to the resource:
href="../images/construction.gif"
CDATA #IMPLIED Yes
longdescref A reference to a textual description of the graphic or object. This attribute supports creating accessible content. It uses standard href syntax. This may be a reference to another DITA topic, or to a non-DITA description. For examples of how this attribute is used in output, see this this topic on long descriptions. CDATA #IMPLIED No
height Indicates the vertical dimension for the resulting image display. If necessary, the image is scaled to the specified size. The value of this attribute is a real number optionally following by a unit of measure from the set of pc, pt, px, in, cm, mm, em (picas, points, pixels, inches, centimeters, millimeters, and ems respectively). The default unit is px (pixels). Possible values include: "5", "5in", and "10.5cm". If a height value is specified and no width value is specified, the width will be scaled by the same factor as the height. If both a height value and width value are specified, some implementations may not be able to scale the two directions by a different factor and may therefore ignore one of the two values. NMTOKEN #IMPLIED No
width Indicates the horizontal dimension for the resulting image display. If necessary, the image is scaled to the specified size. The value of this attribute is a real number optionally following by a unit of measure from the set of pc, pt, px, in, cm, mm, em (picas, points, pixels, inches, centimeters, millimeters, and ems respectively). The default unit is px (pixels). Possible values include: "5", "5in", and "10.5cm". If a width value is specified and no height value is specified, the height will be scaled by the same factor as the width. If both a height value and width value are specified, some implementations may not be able to scale the two directions by a different factor and may therefore ignore one of the two values. NMTOKEN #IMPLIED No
align Controls the horizontal alignment of an image when placement is specified as "break." Allowable values (processor-validated) are: left, right, center, and current. CDATA #IMPLIED No
scale Specifies a percentage by which to scale the image in the absence of any specified image height or width; a value of 100 implies that the image should be presented at its intrinsic size. If a value has been specified for this image's height or width attribute (or both), the scale attribute is ignored. NMTOKEN whose value space is an unsigned integer #IMPLIED No
placement Indicates whether an image should be displayed inline or separated from the surrounding text. The processing default is inline. Allowable values are: inline or break. See Using the -dita-use-conref-target value for more information on the conref value. (inline | break | -dita-use-conref-target) inline No
alt (deprecated) Alternative text that describes the image to provide accessibility to page readers, or provides a text description when an image cannot be displayed by the user's software. The alt attribute is deprecated; use the alt element instead. CDATA #IMPLIED No
%univ-atts; (%select-atts;, %id-atts;, %localization-atts;) A set of related attributes, described at %univ-atts; parameter entity PE not applicable Not applicable
%global-atts; (xtrf, xtrc) A set of related attributes, described at %global-atts; parameter entity PE not applicable Not applicable
class, outputclass, keyref Common attributes described in Other common DITA attributes.      

Return to main page.

OASIS DITA Language Specification v1.1 -- Committee Draft 13 February 2007
Copyright © OASIS Open 2005, 2007. All Rights Reserved.