ul HTML

HTML <ul> Tag

As the name itself suggests, all the list items are marked with bullets by default in a Bulleted List. It is popularly known as HTML Unordered List and hence starts with the <ul> tag. The list items in an HTML Unordered List start with the <li> tag.

Tag specific Attributes:

Attribute Value Uses
compact compact Used to indicate that the list will be displayed smaller than normal. Not supported in HTML5.
type disc

square

circle

Used to indicate the type of marker to be used in the list. Not supported in HTML5.

Global Attributes:

The HTML Global attributes are supported by the HTML <ul> tag.

Event Attributes:

The HTML Event attributes are supported by the HTML <ul> tag.

Supporting Browsers:

Chrome, IE, Firefox, Opera, and Safari.

Example: Type “disc”

<!DOCTYPE html>
<html>
<body>
<h2>HTML Unordered List or Bulleted List</h2>
<ul>
  <li>Name</li>
  <li>Age</li>
  <li>Address</li>
</ul>  
</body>
</html>

Explanation:

In the above example, we created an unordered or bulleted list of the default type in HTML containing three items.

Example: Type “circle”

<!DOCTYPE html>
<html>
<body>
<h2>HTML Unordered List or Bulleted List</h2>
<ul type = "circle">
  <li>Name</li>
  <li>Age</li>
  <li>Address</li>
</ul>  
</body>
</html>

Explanation:

In the above example, we created an unordered or bulleted list of the type “circle” in HTML containing three items.

Example: Type “square”

<!DOCTYPE html>
<html>
<body>
<h2>HTML Unordered List or Bulleted List</h2>
<ul type = "square">
  <li>Name</li>
  <li>Age</li>
  <li>Address</li>
</ul>  
</body>
</html>

Explanation:

In the above example, we created an unordered or bulleted list of the type “square” in HTML containing three items.

Example: Type “none”

<!DOCTYPE html>
<html>
<body>
<h2>HTML Unordered List or Bulleted List</h2>
<ul type = "none">
  <li>Name</li>
  <li>Age</li>
  <li>Address</li>
</ul>  
</body>
</html>

Explanation:

In the above example, we created an unordered or bulleted list without any marking in HTML containing three items.