What is the hierarchy of DITA elements within a topic?
November 10, 2023
|By Bryan Tipper
The hierarchy of DITA elements within a topic follows a structured order, defining how different elements are
nested and organized within a DITA topic document. This hierarchy ensures that content is well-organized and
semantically meaningful.
Hierarchy of DITA Elements
- Root Element: The root element is the highest-level element and serves as the starting
point of a DITA topic. It encapsulates the entire content of the topic. In DITA, the root element can vary
depending on the document type or specialization used. Common root elements include <topic> and
<concept>. - Title Element: The title element, such as <title>, is used to specify the title or
heading of the DITA topic. It provides a brief description of the topic’s content and typically appears
immediately after the root element. - Body Content: The body of the DITA topic, enclosed within <body> tags, contains the
main content of the topic. It includes text, images, lists, tables, and other elements used to convey
information. - Sections: Within the body content, various sections can be used to further structure the
content. Sections can include headings, subheadings, and other elements that break down the topic into
smaller, logically organized parts. - Elements: DITA topics consist of various elements that define the type and formatting of
content. These elements can include paragraphs (<p>), lists (<ul>, <ol>), tables
(<table>), code samples (<codeblock>), links (<xref>), and more. Elements are used to
structure and format the content to convey meaning.
Example: DITA Topic Structure
<topic>
<title>Introduction to DITA Elements</title>
<body>
<p>This is an example of a DITA topic structure.</p>
<section>
<title>Elements in DITA</title>
<p>DITA elements define the structure of content.</p>
<ul>
<li>Paragraphs</li>
<li>Lists</li>
<li>Tables</li>
</ul>
</section>
<section>
<title>Using Attributes</title>
<p>Attributes provide additional information.</p>
<codeblock language="xml">
<p>This is a code sample with attributes.</p>
</codeblock>
</section>
</body>
</topic>