Unordered and ordered lists are rendered equally by the browsers except that the ordered list <ol> ought to be used for listing items that suppose to be sorted out by some manner.
Browsers, unless told differently, will present an ordered list with numbers, while unordered lists <ul> are presented with bullets instead of numbers.
Both, numbers and bullets, have a few options of presentation that are "understood" by browsers, including a possibility of swapping them out with images. They can be easily changed by using style sheets.
List item <li> is used in same manner on both types of lists.
Syntax:
<ul><li></li></ul>, <ol><li></li></ol>
Attributes:
- id, class (document-wide identifiers)
- lang (language information), dir (text direction)
- title (element title)
- style (inline style information)
- onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
Example
HTML unordered and ordered list elements
Comments
No comments have been made yet.
Please login to leave a comment. Login now