HTML List Generator: Bulleted, Numbered and Nested Lists
What Is an HTML List?
A list in HTML is a group of related items, like a shopping list or the steps of a recipe. There are three kinds:
<ul> for a bulleted (unordered) list, <ol> for a
numbered (ordered) list, and <dl> for a description list of terms and
their meanings. Each item in a <ul> or <ol> is an <li>.
This generator writes that code for you. Type or paste your items, one per line, indent lines to nest them, pick a
style, and copy clean HTML and CSS. The nesting is always valid, the text is escaped, and the preview shows the exact
code you copy. It all runs in your browser, and your last list is remembered for next time.
How to Use It, Step by Step
Five quick steps. The preview updates as you type.
Step 1 Type or Paste Your Items
- Write one item per line. Empty lines are skipped.
- Press Tab (or type 2 spaces) to nest a line under the one above it, and Shift+Tab to move it back out. The Indent and Outdent buttons do the same for every selected line.
- Pasting a Markdown list works too:
- item, * item and 1. item lose their marker and keep their indent. - Make an item a link with
Text | https://example.com. Relative paths like /about or page.html and mailto: links work too, and a bare address like example.com gets https:// in front.
Step 2 Pick the List Type
Bulleted makes a <ul>, Numbered an <ol>, and
Description a <dl> from lines like “Term: description”.
Checklist is a bulleted list with ✓ marks (start a line with [ ] for an empty box), and
In a row lays the items side by side, for menus, tags and breadcrumbs.
Step 3 Choose the Markers
Pick a bullet for each level (disc, circle, square, an arrow, a star, none, or any character you type), or a number
style for each level (1, a, A, i, I), plus a start number and “count down”. Switch on Color the bullets
to give the markers their own color with ::marker.
Step 4 Set the Size and Spacing
Change the font size, line height, space between items and how far each level is indented. Bulleted, numbered and
checklists can flow into 2 or 3 columns. Or start from a Preset like Numbered steps, Roman outline,
Arrows, Two columns, Inline tags or Breadcrumb trail.
Step 5 Copy the Code
Pick Class + <style> (a reusable class, best for most sites) or Inline styles
(for places where you can't add CSS), then press Copy all, Copy HTML or
Copy CSS. The notes under the code point out anything worth knowing.
💡 Inline styles can't reach ::marker or ::after, so the marker color and the separators
between items in a row are left out of inline code. The notes tell you when that happens.
How to Make a List in HTML
Use <ul> when the order doesn't matter (things to buy, features) and <ol> when it
does (steps, rankings). Inside, every item is an <li>, and nothing else may sit directly inside the
list. An <li> can hold anything: text, links, images, paragraphs, even another list.
The code:
<h3>Shopping</h3>
<ul>
<li>Milk</li>
<li>Bread</li>
<li>Eggs</li>
</ul>
<h3>Morning routine</h3>
<ol>
<li>Make coffee</li>
<li>Check email</li>
<li>Plan the day</li>
</ol>
Numbered List Options: type, start and reversed
An <ol> has three handy attributes. type picks the numbering, start sets
the first number, and reversed counts down. One item can also jump to a new number with
<li value="10">, and the items after it carry on from there.
| type | Numbers look like | Same in CSS |
1 (default) | 1, 2, 3 | list-style-type: decimal |
a | a, b, c | lower-alpha |
A | A, B, C | upper-alpha |
i | i, ii, iii | lower-roman |
I | I, II, III | upper-roman |
The code:
<ol type="A">
<li>Ingredients</li>
<li>Method</li>
</ol>
<ol start="4">
<li>Fourth step</li>
<li>Fifth step</li>
</ol>
<ol reversed>
<li>Bronze</li>
<li>Silver</li>
<li>Gold</li>
</ol>
Use type when the kind of numbering is part of the meaning, like an outline where people say “see part
B”. If it's only for looks, CSS list-style-type does the same. The generator writes both whenever a level
uses letters or roman numerals, so the style holds up even if one of them is missing.
Nested Lists the Right Way
A list inside a list goes inside the <li> it belongs to, after that item's text.
The browser then indents it and switches the bullet (disc, then circle, then square) on its own. Two or three levels
are easy to follow. Past four, readers get lost, so this generator stops at four.
The code:
<ul>
<li>Fruit
<ul>
<li>Apples</li>
<li>Pears</li>
</ul>
</li>
<li>Vegetables
<ul>
<li>Carrots</li>
</ul>
</li>
</ul>
This is the mistake to avoid. Browsers still draw it, but it's invalid HTML, and screen readers can count the items wrong:
<ul>
<li>Fruit</li>
<ul> <!-- wrong: a list can't sit between <li>s -->
<li>Apples</li>
</ul>
</ul>
Description Lists: dl, dt and dd
A description list is for pairs: a term in <dt> and what it means in <dd>. Think
glossaries, FAQs, product details or the “Name / Email / Phone” lines on a profile. A term can have more than one
description. In the generator, write Term: description on a line, and indent a line to add another
description to the term above.
The code:
<dl>
<dt>HTML</dt>
<dd>Gives a page its structure.</dd>
<dt>CSS</dt>
<dd>Decides how it looks.</dd>
<dt>Weight</dt>
<dd>1.2 kg</dd>
</dl>
Style Bullets and Numbers With CSS
list-style-type picks the marker: disc, circle, square, none, a number style, or any text in quotes like "→ " or "✓ ". ::marker styles only the bullet or number: li::marker { color: red; }. It takes color and font properties, but not margins or backgrounds. padding-left on the list sets the indent. Browsers start at 40px. Long numbers like “10.” or “VIII.” need room, or they stick out on the left. list-style-image: url(star.svg) uses a picture as the bullet, but you can't size or line it up, so many people hide the marker and draw the picture with li::before or a background image instead. list-style-position: inside puts the marker inside the text block, so wrapped lines start under the bullet instead of under the text.
The code:
<style>
.arrows {
list-style-type: "→ ";
}
.arrows li::marker {
color: #2563eb;
}
.squares {
list-style-type: square;
}
.squares li::marker {
color: #db2777;
font-size: 1.2em;
}
</style>
<ul class="arrows">
<li>Fast to load</li>
<li>Easy to read</li>
</ul>
<ul class="squares">
<li>Pink squares</li>
<li>Black text</li>
</ul>
A List in a Row (Navigation Menus)
Menus, tag lists and breadcrumbs are lists too, they just run sideways. Keep the <ul> and
<li> and lay them out with flexbox. flex-wrap: wrap lets them wrap on a phone.
Put a menu in <nav> with an aria-label so screen reader users can jump to it.
The code:
<style>
.menu {
display: flex;
flex-wrap: wrap;
gap: 6px 16px;
margin: 0;
padding: 0;
list-style: none;
}
</style>
<nav aria-label="Main">
<ul class="menu" role="list">
<li><a href="/">Home</a></li>
<li><a href="/blog">Blog</a></li>
<li><a href="/about">About</a></li>
<li><a href="/contact">Contact</a></li>
</ul>
</nav>
The role="list" is there because Safari may stop announcing a list as a list once its bullets are gone
with list-style: none. It does no harm in other browsers.
A List in Columns
The CSS columns property splits a long list into 2 or 3 columns. The items fill the first column top to
bottom, then move to the next. break-inside: avoid keeps an item (and its nested list) from being split
between two columns.
The code:
<style>
.two-cols {
columns: 2;
column-gap: 40px;
}
.two-cols li {
break-inside: avoid;
}
</style>
<ul class="two-cols">
<li>Apples</li>
<li>Bananas</li>
<li>Cherries</li>
<li>Dates</li>
<li>Figs</li>
<li>Grapes</li>
</ul>
Accessibility Notes
- Screen readers announce a real list with its size (“list, 5 items”) and let people skip past it. That's why a real
<ul> beats lines of text with dashes. - Use
<ol> when order matters: steps, rankings, instructions. People then hear “1 of 5”. - When you remove the bullets with
list-style: none, add role="list" so Safari keeps treating it as a list. - Characters used as bullets (→, ★, ✓) may be read out loud, like “black star”. Plain shapes are quieter.
- A ✓ drawn with CSS doesn't tell anyone that a task is done. If that matters, say it in the text, or use real checkboxes from the Dropdown Generator.
- Keep the marker color readable on its background, the same as text.
Common Mistakes
- A nested
<ul> next to the <li> instead of inside it. It's invalid, and item counts go wrong. Move it inside the parent item. - Using
<br> and dashes instead of a list. It looks like a list but isn't one, so screen readers and search engines read a blob of text. <div>s pretending to be a list. If it reads like a list, mark it up as one. You can style a <ul> to look like anything. - Text directly inside
<ul>. Only <li> (and script or template elements) may sit directly in a list. - Picking
<ol> or <ul> for the look. Choose by meaning, then change the markers with CSS. - Typing the numbers yourself. “1. 2. 3.” typed into the text breaks as soon as you move an item. Let
<ol> count.
What This Generator Doesn't Do
- It doesn't format text inside an item. What you type is escaped, so
<b> shows up as text. Add bold or other tags to the copied code yourself, or write rich text with Text to HTML. - Each item is one line. For items with several paragraphs, edit the copied code.
- It goes four levels deep, and a list in a row is always one level.
- Outline numbers like 1.1 and 1.2 need CSS counters, which it doesn't write. The HTML Tags reference covers every list element if you want to go further.
Writing in Markdown already? Markdown to HTML turns - item lists into HTML
along with the rest of your text. Need filler items for a mockup? Make them with the
Lorem Ipsum Generator, which can output lists too.
Frequently Asked Questions
How do I make a bulleted list in HTML?
Wrap the items in <ul> and put each one in its own <li>: <ul><li>Milk</li><li>Bread</li><li>Eggs</li></ul>. The browser adds the bullets and pushes the list in a little. For a numbered list, use <ol> instead of <ul>; the <li> items stay the same.
How do I make a nested list?
Put the inner list inside the <li> it belongs to, right after that item's text: <ul><li>Fruit<ul><li>Apples</li><li>Pears</li></ul></li><li>Bread</li></ul>. A <ul> placed directly between two <li> elements, as their sibling, is invalid HTML, even though browsers still show something. In this generator you just indent a line with Tab or 2 spaces and the nesting is done for you.
How do I start a numbered list at a different number, or count down?
Use the start attribute on the <ol>: <ol start="5"> begins at 5. Add reversed to count down: <ol reversed> numbers the items from the highest to 1. Both work together, so <ol reversed start="10"> counts 10, 9, 8 and so on. A single item can jump to a new number with <li value="20">.
How do I get letters or roman numerals instead of numbers?
Set the type attribute on the <ol>: type="a" gives a, b, c; type="A" gives A, B, C; type="i" gives i, ii, iii; and type="I" gives I, II, III. In CSS the same thing is list-style-type: lower-alpha, upper-alpha, lower-roman or upper-roman. CSS also has more styles, like decimal-leading-zero (01, 02, 03).
How do I change the bullet style or color?
list-style-type picks the shape: disc, circle, square or none, or any text in quotes, like list-style-type: "→ ". To color only the bullet and not the text, use the ::marker pseudo-element: li::marker { color: #db2777; }. ::marker only takes a few properties (color, font size and a couple more), so for bigger changes people hide the marker and draw their own with ::before.
How do I remove the bullets from a list?
Set list-style: none on the <ul>, and usually padding-left: 0 too, because the indent is padding. One catch: Safari may stop treating a list without bullets as a list, so VoiceOver users don't hear "list, 4 items". Adding role="list" to the <ul> keeps it a list. This generator does that for you when you pick None.
What is a description list in HTML?
A <dl> holds pairs of terms and descriptions: each <dt> is a term and the <dd> after it describes it, like a glossary or a set of product details (<dt>Weight</dt><dd>1.2 kg</dd>). A term can have more than one <dd>, and several <dt> can share one description. Use it for name and value pairs, not just to get indented text.
How do I show a list in a row, like a menu?
Keep the <ul> and <li> elements and change the layout with CSS: ul { display: flex; flex-wrap: wrap; gap: 16px; list-style: none; padding: 0; }. The items sit side by side and wrap on small screens. For site navigation, put the list inside <nav aria-label="Main"> so screen readers can find it. Pick "In a row" in this generator to get that code, with separators like · or › if you want them.