Are there DITA templates for consistent image placement and formatting?

DITA provides the flexibility for organizations to create and utilize templates for consistent image placement and formatting, ensuring uniformity in how images are presented in their documentation. These templates serve as reusable structures that guide authors in placing and styling images, maintaining brand and formatting standards.

DITA doesn’t have predefined templates for image placement and formatting, but organizations can create their own DITA templates to enforce consistency in how images are handled. DITA templates are essentially reusable frameworks or guidelines for structuring content. These templates can include elements, attributes, and content models specific to image handling. For example, a DITA template for images might define the expected structure for a topic that includes an image, specifying attributes for image style, placement, and sizing. Authors can then use these templates as a starting point for creating consistent image-rich content.

Using templates for image control in DITA involves creating DITA templates, defining template structure, guiding authors, and consistency and branding.

  • Creating DITA Templates: DITA templates are structures designed to guide content authors in creating consistent content. They are not predefined in the DITA standard but are created by organizations to match their specific content needs. To enforce uniform image placement and formatting, organizations can create custom DITA templates. These templates typically include elements, attributes, and content models relevant to images.
  • Defining Template Structure: The template structure can specify where and how images should be placed within a topic. For example, it can define that each topic should include an “image” element, which may have attributes like “image-style,” “image-placement,” or “image-size.” These attributes can control aspects like the visual style (e.g., frame, border, background) and the positioning (e.g., left-aligned, centered) of the images.
  • Guiding Authors: Authors are then guided to use these templates when creating new content. They apply the relevant template to a new topic, which provides a pre-defined structure and attributes for image handling. This ensures that authors follow a standardized approach when inserting and styling images in their documents.
  • Consistency and Branding: By using these templates, organizations can enforce branding and formatting standards for images. For example, a template could specify that product images should have a certain frame, a drop shadow effect, and be right-aligned. This consistency not only ensures that the organization’s branding is maintained but also simplifies the authoring process, as authors don’t have to remember or manually apply specific styles to each image.


A company manufactures electronic gadgets and wants to maintain consistency in its user manuals. They create a custom DITA template for product images:

<!-- Custom DITA template for Product Images -->
<topic-template id="ProductImageTemplate">
  <title>Product Image</title>
    <keywords>product-image, branding, formatting</keywords>
    <image image-style="product-frame" image-placement="right" image-size="medium">
      <desc>Product image description</desc>