Can you use lists (e.g., <ul> and <ol>) in DITA content?

Yes, DITA supports the use of lists to organize and present information effectively. Lists can include unordered (bulleted), ordered (numbered), and definition lists, each serving specific purposes in structured documentation.

Unordered (Bulleted) Lists:

Unordered lists use bullet points to present items without any specific order or sequence. They are typically used for presenting lists of items or concepts that don’t require a particular order or hierarchy.

Example:


<ul>
  <li>Item 1</li>
  <li>Item 2</li>
  <li>Item 3</li>
</ul>

Ordered (Numbered) Lists:

Ordered lists use numbers to indicate the order or sequence of items. They are used to convey information in a specific order, such as step-by-step instructions.

Example:


<ol>
  <li>First step</li>
  <li>Second step</li>
  <li>Third step</li>
</ol>

Definition Lists:

Definition lists provide pairs of terms and their corresponding definitions. They are used for glossaries, dictionaries, or any content where a term needs an associated definition.


<dl>
  <dt>Term 1</dt>
  <dd>Definition for Term 1</dd>
  <dt>Term 2</dt>
  <dd>Definition for Term 2</dd>
</dl>

Example:

An organization is creating user documentation for a software application using DITA:

They might use an unordered list to present a set of user interface features:


<ul>
  <li>Dashboard</li>
  <li>Settings</li>
  <li>Reports</li>
</ul>

For a step-by-step guide, they can use an ordered list:


<ol>
  <li>Open the application.</li>
  <li>Click on "Settings."</li>
  <li>Adjust your preferences.</li>
</ol>

In a section explaining terminology, a definition list can be used:


<dl>
  <dt>UI</dt>
  <dd>User Interface</dd>
  <dt>API</dt>
  <dd>Application Programming Interface</dd>
</dl>