<ol> Tag Syntax

Rules for coding HTML ordered list elements
<body>
   ...
   ... flow content expected ...
   <ol>
      <li>
         ... flow content ...
      </li>
      ...
   </ol>
   ...
</body>

Make sure you understand the difference between a tag and element and are familiar with the definitions of namespace and other HTML terms.

  1. Code a ol element inside an element where flow content is allowed.
  2. Begin the ol element with a starting <ol> tag. The element name uses lower case letters and should be in the HTML namespace, which it will pick up automatically from the xmlns attribute on the <html> tag.
  3. Inside the ol element, between the <ol> starting tag and the </ol> ending tag, code the li elements for the list items.
  4. End the ol element with a matching </ol> closing tag.
Content of the ol element

The content of the ol element can only include HTML comments and li elements.