HTML li tag with ol and ul with examples

HTML <li> tag

The <li> tag is used to create list items in HTML lists. Whether you can creating ordered or unordered lists you have to use <li>List value</li> tag series inside <ol> or <ul> tags to create complete lists.

Following are few examples with ordered, unordered and CSS list with <li> tag use.

Example of using HTML li inside <ol>

Following example shows using <li> tag inside ordered list.

Using li inside unordered list example

Following example creates list by using <li> tag inside <ul> tag.

CSS ul li example

Following example applies CSS to unordered list. The ul style is created in CSS with border, background CSS properties where ul li is used to assign CSS style to list item (<li>).

Also see HTML div | HTML forms

Was this article helpful?

Related Articles

Leave A Comment?