Basic topic elements
The generic topic structure is used for untyped
topics. While much of the DITA architecture is built on generic topics,
it is generally better to use more specific information types (such
as concept, task, or reference) when they are available.
For an answer to the question "What are topics?" and more details on when to use different information types, please refer to DITA topics.
- topicThe <topic> element is the top-level DITA element for a single-subject topic or article. Other top-level DITA elements that are more content-specific are <concept>, <task>, <reference>, and <glossentry>, all of which are specializations of the <topic> element.
- titleThe <title> element contains a heading or label for the main parts of a topic, including the topic as a whole, its sections and examples, and its labelled content, such as figures and tables. Beginning with DITA 1.1, the element may also be used to provide a title for a map. With DITA 1.2, the element is also available in reltables, although in the reltable a title is typically used for reference information (not for content displayed to an end user).
- titlealtsThe <titlealts> element allows the insertion of alternate titles, such as titles that should be used in creating a table of contents for navigation or a title specific to search results. When the <titlealts> element is absent, the title element is used for all title purposes.
- searchtitleThe <searchtitle> element is used to specify a title that should be displayed by search tools that locate the topic. This is most useful when the topic has a title that makes sense in the context of a single information set, but may be too general in a list of search results; for example, a topic title of "Markup example" may make sense as part of a guide to DITA, but when found among thousands of unrelated topics, a search title of "DITA markup example" is more useful.
- navtitleThe navigation title (<navtitle>) element is one of a set of alternate titles that can be included inside the <titlealts> element. This navigation title may differ from the first level heading that shows in the main browser window. Use <navtitle> when the actual title of the topic isn't appropriate for use in a table of contents, navigation pane, or online content (for example, because the actual title is too long). Beginning with DITA 1.2, the navtitle element is also available in the <topicmeta> element in a <topicref> in a map, and its use is preferred over the topicref's navtitle attribute.
- shortdescThe short description (<shortdesc>) element occurs between the topic title and the topic body, as the initial paragraph-like content of a topic, or it can be embedded in an abstract element. The short description, which represents the purpose or theme of the topic, is also intended to be used as a link preview and for searching. The <shortdesc> element also can be used in a DITA map.
- abstractThe abstract element occurs between the topic title and the topic body, as the initial content of a topic. It can contain paragraph-level content as well as one or more shortdesc elements which can be used for providing link previews or summaries. The <abstract> element cannot be overridden by maps, but its contained <shortdesc> elements can be, for the purpose of creating link summaries or previews.
- bodyThe <body> element is the container for the main content of a <topic>.
- bodydivThe <bodydiv> element is used to contain informal blocks of information within the body of a topic. The bodydiv element is specifically designed to be a grouping element, without any explicit semantics, other than to organize subsets of content into logical groups that are not intended or should not be contained as a topic. As such, it does not contain an explicit title to avoid enabling the creation of deeply nested content that would otherwise be written as separate topics. Content that requires a title should use a section element or a nested topic.
- related-linksThe related information links of a topic (<related-links> element) are stored in a special section following the body of the topic. After a topic is processed into its final output form, the related links are usually displayed at the end of the topic, although some Web-based help systems might display them in a separate navigation frame.
- ditaThe <dita> element provides a top-level container for multiple topics when you create documents using the ditabase document type. The <dita> element lets you create any sequence of concept, task, and reference topics, and the ditabase document type lets you nest these topic types inside each other. The <dita> element has no particular output implications; it simply allows you to create multiple topics of different types at the same level in a single document.
Next topic: Body elements
Parent topic: Topic elements