List Item <li> Tag Syntax

Rules for coding HTML li elements
<body>
   ...
   ... flow content expected ...
   <ol> or <ul> or <menu>
      <li>
         ... flow content ...
      </li>
      ...
   </ol> or </ul> or </menu>
   ...
</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. Inside a ol element, ul element or menu element, include one or more li elements.
  2. Begin each li element with a starting <li> 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 li element, between the <li> starting tag and the </li> ending tag, code the inner HTML flow content for the list item.
  4. When inserting a list item or deleting a list item, code the <ins> tag or <del> tag inside the <li> tag.
  5. End the li element with a matching </li> closing tag.
Content of the li element

The content of the li element can include HTML comments, text content and any tags that can be used in flow content.