By using this site you agree to the use of cookies by Brugbart and our partners.

Learn more

HTML OL UL and LI Tags

Reference on HTML Lists. This entry includes information about how to use unordered and ordered lists, and a list of allowed attributes.

Created: 2013-06-28 00:49

The ol element and ul element are used to create lists. Ol stands for ordered lists, while ul stands for unordered lists. The difference is that ordered lists are numbered, while unordered ain't. Both list-types are used together with the li element.

They are both useful to make your pages more accessible for screen readers.


 <li><a href=""></a></li>

The above is a list containing a single link, and shows how to use ol together with li tags. For each item you need an additional li element, example below:

 <li><p>Item 1</p></li>
 <li><p>Item 2</p></li>

Note.You are also allowed to use headings and paragraphs inside li tags, like done above.