<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.
- Code a ol element inside an element where flow content is allowed.
- 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
xmlnsattribute on the <html> tag. - Inside the ol element, between the
<ol>starting tag and the</ol>ending tag, code the li elements for the list items. - 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.