HTML <ul>Tag


Examples

Unordered HTML list:

<ul> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ul>

Try it Yourself »
(More examples at the bottom of the page)

Browser Support

Tag
<ul> Yes Yes Yes Yes Yes

Tag Definition and Usage Instructions

The <ul> tag defines an unordered list.

Use the <ul> tag together with the<li>tag together to create an unordered list.


Tips and Notes

Tip:Use CSS to style the list.

Tip:Use<ol>tag to create an ordered list.


Differences between HTML 4.01 and HTML5

In HTML 4.01, the "compact" and "type" attributesare deprecated. HTML5 does not support these two attributes.


Attributes

Attribute Value Description
compact compact Not supported in HTML5. Deprecated in HTML 4.01.Specifies that the list should render more compactly than normal.
type disc
square
circle
Not supported in HTML5. Deprecated in HTML 4.01.Specifies the type of bullet points for the list.


Global Attributes

The <ul> tag supportsHTML Global Attributes。


Event Attributes

The <ul> tag supportsHTML Event Attributes。


Examples

Try it Yourself - Examples

List markers
Demonstrates different list markers.

Nested lists
This example demonstrates how to nest lists.

Nested lists 2
This example demonstrates more complex nested lists.


Related Articles

HTML Tutorial:HTML Lists

Other Extensions