<ol>: How do you use the <ol> element to create ordered (numbered) lists within a DITA topic?

Structured documentation in DITA XML extends to creating ordered (numbered) lists when necessary to present information in a specific sequence. The <ol> element is employed to create ordered lists within a DITA topic, allowing content creators to provide instructions, steps, or procedures that need to be followed in a particular order.

Creating Ordered Lists

To create an ordered list in DITA, you utilize the <ol> element. Inside the <ol> element, you can use the <li> (list item) element to represent each numbered item in the list. These items are typically numbered sequentially, and DITA processing systems will automatically handle the numbering based on the document structure.

Example:

Here’s an example illustrating how the <ol> element is used to create an ordered list within a DITA topic:


<topic id="installation_steps">
  <title>Installation Steps</title>
  <body>
    <ol>
      <li>Unpack the product package.</li>
      <li>Read the installation instructions carefully.</li>
      <li>Run the setup program from the provided CD or download.</li>
      <li>Follow the on-screen prompts to complete the installation.</li>
    </ol>
  </body>
</topic>

In this example, the DITA topic “Installation Steps” includes an ordered list created with the <ol> and <li> elements. Each list item represents a step in the installation process and is automatically numbered by the DITA processing system, ensuring that the steps are presented in the correct order.