When writing in HTML, the <ul> tag is a block element used to designate an unordered list. It is useful for creating bulleted lists, those in which the order of the items is arbitrary. The following sections contain information about the <ul> tag, including an example of it in use, as well as related attributes and browser compatibility.
<h3>Unordered List</h3>
<ul>
<li>First bullet point</li>
<li>Second bullet point</li>
<li>Third bullet point</li>
</ul>
<h3>Start at number 5</h3>
<ol start="5">
<li>Fifth numbered item</li>
<li>Sixth numbered item</li>
<li>Seventh numbered item</li>
</ol>
Within an HTML tag, an attribute dictates certain aspects of an HTML element. Attributes are made up of a name and value pair; all tags support standard attributes. A deprecated attribute is one that may function currently, but is not supported in going forward. While the attribute may work with the current version of HTML, it will eventually be phased out. It is better to avoid using these attributes to help future-proof your website.
Attribute | Description |
---|---|
compact | Designates that the list should appear smaller |
type | Designates the type of markers to use in a list |