HTML <ul> type Attribute
The HTML <ul> type attribute in the <ul> tag specifies the type of marker used in an unordered list. Values include disc (default filled circle), circle (hollow circle), square, and none. It controls the appearance of list items.
Note: The ul type attributes are not supported by HTML 5. Instead of using this attribute, we can use the CSS list-style-type Property.
Syntax:
<ul type="disc | circle | square">
Attribute Values:
- disc: Default. A filled circle.
- circle: An unfilled circle
- square A filled square.
HTML <ul> type Attribute Examples
Example 1: In this example, we display an unordered list without the type attribute. The list contains items from w3wiki courses: Beginner, Sudo, Gfg, Gate, and Placement.
<!DOCTYPE html>
<html>
<head>
<title>HTML ul type attribute</title>
</head>
<body>
<h2>HTML ul type attribute</h2>
<p>w3wiki courses List:</p>
<ul>
<li>Beginner</li>
<li>Sudo</li>
<li>Gfg</li>
<li>Gate</li>
<li>Placement</li>
</ul>
</body>
</html>
Output:
Example 2: In this example we showcasing an unordered list with the type attribute set to “square”. The list enumerates w3wiki courses: Beginner, Sudo, Gfg, Gate, and Placement.
<!DOCTYPE html>
<html>
<head>
<title>HTML ul type attribute</title>
</head>
<body>
<h2>HTML ul type attribute</h2>
<p>w3wiki courses List:</p>
<ul type="square">
<li>Beginner</li>
<li>Sudo</li>
<li>Gfg</li>
<li>Gate</li>
<li>Placement</li>
</ul>
</body>
</html>
Output:
Supported Browsers: The browser supported by HTML <ul> Type attribute are listed below:
Contact Us