HTML Tutorial

List Element

There are two types of lists that are most often used in HTML: ordered and unordered.

The ordered list <ol> creates a list that uses incrementing numbers as bullet points for each item.

The unordered list <ul> creates a list that uses filled black circles as bullet points for each item.

In both cases, each list item must appear within the <li></li> tags

Attributes

None exist for this tag.

Example

Code:

<html>
	...
	<body>
		<ul>
			<li>Unordered Item A</li>
			<li>Unordered Item B</li>
		</ul>
		<ol>
			<li>Ordered Item A</li>
			<li>Ordered Item B</li>
		</ol>
	</body>
</html>

Screen Output:

  • Unordered Item A
  • Unordered Item B
  1. Ordered Item A
  2. Ordered Item B