The <keyword> element identifies a keyword or token, such as a single value from an enumerated list, the name of a command or parameter, product name, or a lookup key for a message.

A keyword contains any text that has a unique or key-like value, such as a product name. Where there is an element that has a better meaning for what you are describing, use that element. The <keyword> element is a generic element; use it when no other element applies. The <keyword> element can also be used to contain reusable text.

Specific markup recommendations:

  • Use <apiname> for API names and <cmdname> for command names.
  • Use <term> to indicate what you are defining with inline paragraph definitions.
  • Use <ph> for general phrases when <keyword> is not appropriate.
  • Use <kwd> to indicate programming keywords in syntax diagrams and syntax phrases.

Specialized elements derived from <keyword> might also have extended processing, such as different formatting or automatic indexing.

All <keyword> or <indexterm> elements in the <keywords> metadata element are considered part of the topic's metadata and should be processed as appropriate for the given output medium.

While the <keyword> element can be used inline, the <keywords> element is not an inline element. The <keywords> element only appears in the <topicmeta> or <prolog> elements; it is used to specify keywords that apply to the topic.

Content models

See appendix for information about this element in OASIS document type shells.


- topic/keyword

<p>The <keyword>assert</keyword> pragma statement allows messages to be passed
to the emulator, pre-compiler, etc..</p>
<p>The <keyword id="myProduct">AmazingProduct</keyword> can make use of
this feature to do really neat stuff.</p>


The following attributes are available on this element: Universal attribute group, @outputclass, and @keyref.

Was this helpful?