Latest web development tutorials

HTML <ul> tag

Examples

Unordered HTML list:

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

try it"
(For more examples, see the bottom of the page)

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the <ul> tag.


Tag definitions and instructions

<Ul> tag defines an unordered list.

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


Tips and Notes

Tip: Use CSS to define the style list.

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


Differences between HTML 4.01 and HTML5

In HTML 4.01, "compact" and "type" attribute obsolete . HTML5 is not supported by the two properties.


Attributes

属性 描述
compact compact HTML5 不支持。HTML 4.01 已废弃。 规定列表呈现的效果比正常情况更小巧。
type disc
square
circle
HTML5 不支持。HTML 4.01 已废弃。 规定列表的项目符号的类型。


Global Properties

<ul> tag supports HTML global properties .


Event Properties

<ul> tag supports HTML event properties .


Examples

Try - Example

Nested list
This example demonstrates how nested list.

Nested list 2
This example demonstrates a more complicated nested list.


related articles

HTML Tutorial: HTML list