HTML <ul>Tag: The HTML<ul> tag specifies an unordered list. It is useful for creating bulleted lists, those in which the order of the items is arbitrary. <ul>tag has two important attributes they are compact and type.
HTML <ul>Tag
This HTML ul tag supports both the global and the event attributes.
Syntax: <ul>Text </ul>
Browser compatibility
The HTML ul tag is supported by different types of browsers.
- Chrome
- Firefox
- Opera
- Safari
- InternetExplorer
Example:
<!DOCTYPE html> <html> <body> <h4>An Unordered List:</h4> <ul> <li>HTML</li> <li>C</li> <li>JAVA</li> </ul> </body> </html>
Output:
An Unordered List:
- Coffee
- Tea
- Milk
Attributes that are supported by the <ul> tag
Attribute | Value | Description |
---|---|---|
compact | compact | Specifies that the list should render smaller than normal |
type | disc square circle |
Specifies the kind of marker to use in the list |