Skip to content

List Generator

Presets One click to load a look, then fine-tune it

Items

Indent a line (Tab or 2 spaces) to nest it under the line above, up to 4 levels. - item and 1. item work too. Add a link with Text | https://example.com. Press Esc, then Tab, to leave the box.

List type
Bullets
Try ✓, ✔, ☑ or ✅. Lines starting with [ ] get an empty box.
Between items
Layout
Size and spacing
Columns
Code

The preview is the exact code below on a plain page. Links open in a new tab.

<style>
  .list,
  .list ul {
    margin: 0;
    padding-left: 28px;
  }

  .list {
    list-style-type: disc;
    font-size: 16px;
    line-height: 1.5;
  }

  .list ul {
    list-style-type: circle;
  }

  .list ul ul {
    list-style-type: square;
  }

  .list li + li,
  .list li > ul {
    margin-top: 6px;
  }
</style>

<ul class="list">
  <li>Getting started
    <ul>
      <li>Install a code editor</li>
      <li>Make a folder for your site</li>
    </ul>
  </li>
  <li>HTML basics
    <ul>
      <li>Headings and paragraphs</li>
      <li><a href="/html-tags">Links and images</a></li>
      <li>Lists
        <ul>
          <li>Bulleted lists</li>
          <li>Numbered lists</li>
        </ul>
      </li>
    </ul>
  </li>
  <li>CSS basics
    <ul>
      <li>Colors and fonts</li>
      <li>Spacing and layout</li>
    </ul>
  </li>
</ul>
  • Put the <style> block in your page's <head> (or the CSS in your stylesheet), and the list where you want it.
  • Each nested list sits inside the <li> of the item above it, right after its text. That is the only valid spot for it.

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>

You'll see:

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.

typeNumbers look likeSame in CSS
1 (default)1, 2, 3list-style-type: decimal
aa, b, clower-alpha
AA, B, Cupper-alpha
ii, ii, iiilower-roman
II, II, IIIupper-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>

You'll see:

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>

You'll see:

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>

You'll see:

Style Bullets and Numbers With CSS

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>

You'll see:

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>

You'll see:

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>

You'll see:

Accessibility Notes

Common Mistakes

What This Generator Doesn't Do

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.