<ul> Tag Syntax
<body> ... ... flow content expected ... <ul> <li> ... flow content ... </li> ... </ul> ... </body>
Rules for coding the HTML ul
element
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 ul element inside an element where flow content is allowed.
- Begin the ul element with a starting <ul> 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. - Inside the ul element, between the
<ul>
starting tag and the</ul>
ending tag, code the li elements for the list items. - End the ul element with a matching
</ul>
closing tag.
Content of the ul element
The content of the ul element can only include HTML comments and li elements.