An ordered list is represented by the <ol> element and consists of a list of items sorted by sequence or order of importance. An ordered list can be used in both concepts and tasks.
Use the <ol> element to create a numbered list of all the steps that the user must follow to complete the task.
Example code:
<ul> <li>First item. <p>Continuation paragraph.</p> </li> <li>Second item. This item contains an ordered list. <ol> <li>First do this.</li> <li>Then do that.</li> <li>Finally do this.</li> </ol> </li>
Step-by-step guide
To create an ordered list, perform the following:
- Place your cursor in the desired location and click the ENTER key. This step assumes your carat is located in the correct location within your concept, task, or reference and complies with the DITA schema for your information type. See below for more information.
- Type "o" to navigate to all elements that begin with the letter "o." Select "ol."
Common locations to place an ordered list <ol/> in a concept
In a concept, you can place an <ol/> element in several areas inside a <conbody/> element within a concept.
- Inside a <p/> element
- After a <p/> element
- Inside an <ol/> element to create a sublist
- Inside a <note/> element
- Inside a <section/> element
Common locations to place an ordered list <ol/> in a task
Tasks typically place more constraints on where you can use an <ol/> element.
- Inside a <p/> element, for example within <context/> or <info/>
- Inside a <step/> by wrapping an <ol/> in an <info/> element after a <cmd/> element.
- Inside a <step> element in a <stepresult/> element
- Inside a <result> element after the closing <steps/> element
- Inside a <postreq/> element after the closing <steps/> element