Summary -

In this topic, we described about the <li> tag along with detailed example.

List item in HTML documents. The <li> tag used to represent a list item in HTML document. The <li> tag can used in conjunction with ul(unordered list) or ol(ordered list).

The tag can be specified like <li></li> with the list item in between the opening and closing tags. The <li> tag is a nested tag. <li> tag closing tag is mandatory.

Syntax -

<li>HTML text here </li>

Optional Attributes -

TypeSpecifies what kind of bullet point used.Not supported in HTML51AaIidiscsquarecircle
ValueSpecifies the value of the list itemnumber

Example -

<!DOCTYPE html>
		<title>LIST tag example.. </title>
		<h6> Ordered list: </h6>
		<h6> UnOrdered list: </h6>

Output -

Ordered list:
  1. Monday
  2. Tuesday
  3. Wednesday
  4. Thursday
  5. Friday
  6. Saturday
  7. Sunday
UnOrdered list:
  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday
  • Sunday