The <ul> element represents an unordered list — a group of items where the order does not change the meaning. Browsers usually show a bullet for each <li>.
Use <ol> when order matters (steps, rankings). Style markers with CSS list-style-type, not the old HTML type attribute. Nest lists by placing a new <ul> or <ol>inside an <li>.
Baseline · Widely available.
Not deprecated. Stable across browsers since about July 2015 (and much earlier in practice).
Deprecated attributes.
Do not use type or compact on <ul>. Prefer CSS list-style-type and line-height.
Choosing ul vs ol.
Shuffle the items in your head. If the meaning changes, use <ol>; if not, use <ul>.
Syntax
HTML Syntax
syntax.html
<ul><li>item</li></ul>
Both start and end tags are required. Direct children should be <li> (plus optional <script> / <template>). Nested lists belong inside an <li>, not as siblings of <li>.
Reference
Attributes
Prefer global attributes plus CSS for styling. These element-specific attributes are deprecated — shown only so you recognize them in old markup:
Set list-style-type to circle (or disc, square, none).
Keep HTML free of type so styling stays in CSS.
Reuse the class anywhere you need the same bullet look.
Edge Cases & Pitfalls
Most ul mistakes are wrong nesting, using lists for layout, or relying on deprecated attributes.
nesting
Nest lists inside li, not beside it
A <ul> or <ol> must not be a direct child of another list. Place the nested list inside the parent <li>.
meaning
Do not use ul for ordered steps
If reordering items changes the meaning, use <ol>. Bullets imply no required sequence.
deprecated
Avoid type and compact
Both are obsolete on <ul>. Style markers and spacing with CSS for consistent, maintainable results.
layout
Lists are not a layout tool
Use <ul> for real lists (nav, features, ingredients). For generic containers, prefer <div> or semantic sections.
a11y
Keep the list role intact
Implicit role is list. Do not strip list semantics with CSS alone when items are still a list — screen readers rely on correct markup.
Compatibility
Browser Support
The <ul> element is core HTML in every modern browser. It is not a Node.js, Deno, or Bun API.
✓ Baseline · Widely available
<ul>
Widely available since about July 2015 (and far earlier in practice). Chrome, Firefox, Safari, Edge, and Opera all support unordered lists and nesting.
98%Global support (approx.)
Google ChromeAll modern
Full support
Mozilla FirefoxAll modern
Full support
Apple SafariAll modern
Full support
Microsoft EdgeAll modern
Full support
OperaAll modern
Full support
Samsung InternetAll modern
Full support
Internet ExplorerAll
Full support
<ul>Widely supported
Bottom line: Safe for production lists. Prefer CSS for bullet style, and nest child lists inside li elements.
Remember
Key Takeaways
Role:<ul> groups items when order does not change the meaning.
Children: put content in <li>; nest other lists inside an <li>.
Styling: use CSS list-style-type — not deprecated type/compact.
Sibling: ordered sequences → <ol>; name/value groups → <dl>.
One line: use <ul> + <li> for unordered items, nest inside <li>, and style bullets with CSS.
UA style
Default CSS Settings
Typical user-agent styling for ul (exact values can vary slightly by browser):