What is the role of keywords and subjects in DITA indexing?

Keywords and subjects play a crucial role in DITA indexing, helping users efficiently locate and navigate content. They are used to categorize and tag content, making it more discoverable and aiding users in finding relevant information.


Keywords are specific terms or phrases that describe the content’s primary topics or themes. These terms are embedded within the content, often in specialized elements like <keyword>. Keywords can be found throughout the DITA topics to highlight critical concepts. They serve as a quick reference point for both authors and users when identifying the content’s main focus.


Subjects are broader categorizations of content, which group topics with related keywords under a common theme. In DITA, subjects are typically associated with maps or other organizational structures rather than individual topics. They provide a high-level overview of the content’s main sections, making it easier for users to grasp the document’s structure.


A DITA-based software documentation makes use of keywords and subjects.

Keywords: Within individual topics, keywords may be included to highlight the most critical terms or concepts. For a software manual, a topic about user authentication might include keywords like “authentication,” “security,” “login,” “password,” and “access control.” These keywords help users quickly identify the main points of the topic.


This topic covers the following concepts: <span class="keyword">authentication</span>, <span class="keyword">security</span>, <span class="keyword">login</span>, <span class="keyword">password</span>, and <span class="keyword">access control.

Subjects: At the map level, topics may be grouped under subjects that reflect the broader categories of the documentation. For example, a subject might exist for “Security Features” that includes topics about user authentication, data encryption, and firewall settings. Users navigating the documentation can see these subject headings, making it clear where to find information on specific aspects of security.

  <title>Software Documentation</title>
  <subject>Getting Started</subject>
  <subject>Security Features</subject>
    <topicref href="authentication.dita" />
    <topicref href="encryption.dita" />
    <topicref href="firewall-settings.dita" />
  <!-- Other subjects and topics -->

In this example, keywords help users identify critical concepts within a topic, while subjects organize topics into broader categories, enhancing navigation and the user’s understanding of the document’s structure. Users can quickly locate information based on keywords and subjects, making the content more accessible and user-friendly.