Learn how to make an unordered list in HTML using the ul tag, with li items for each entry. We’ll cover why bullets appear, how to nest lists, and what each tag means in semantic markup. A quick, practical refresher that fits into real-world web pages.

Multiple Choice

What do you use to create an unordered list in HTML?

To create an unordered list in HTML, the correct element is `<ul>`. This tag is specifically designed for unordered lists, which present list items with bullet points rather than numbers. Each item in the unordered list is wrapped with the `<li>` tag, which stands for "list item." For example, an unordered list would be structured like this: ```html <ul> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> </ul> ``` In this example, the items "Item 1," "Item 2," and "Item 3" will be displayed with bullet points. The use of `<ul>` is essential since it indicates that the list does not have a definitive order, which is a crucial feature of unordered lists. The other options presented do not represent valid HTML tags for creating unordered lists. `<ol>` is used for ordered lists, which display items in a numbered format. `<list>` is not a recognized HTML element at all, and `<item>` is incomplete and not valid for defining elements in a list structure.

HTML feels like a little toolkit you carry around, ready to organize ideas, navigation, and content in a way that’s both human-friendly and machine-friendly. One of the first—yet often overlooked—building blocks you’ll reach for is the unordered list. It’s the quiet workhorse behind menus, feature bullets, and any time you want a casual, non-numbered set of items. Let’s unpack what it is, how it works, and where it shines.

A gentle nudge toward semantics

Think of a list as a map for the reader’s eye. An unordered list signals that the items don’t have to be read in a strict sequence. They’re related, but not in a “this comes before that” sense. You’ll spot them in navigation menus, bullet point summaries, or any place you want to present related items without implying a rank order. The key is that the list’s value lies in grouping, not ordering.

The bones of the structure

In HTML, the unordered list is built with two primary elements:

  • ul: the container that marks the whole list as unordered

  • li: the individual items inside the list

Here’s the simplest example you’ll probably remember from early lessons:

  • Item 1
  • Item 2
  • Item 3

That little snippet is a perfect balance of clarity and power. The browser will render bullet points by default, but you can tailor the visual spin with CSS whenever you want something a bit more tailored to your site’s vibe.

A quick word on the siblings and the nest

Lists aren’t solitary creatures. They can live inside other lists, inside sections, or alongside paragraphs of text. And you can nest them if you need to show subtopics or nested categories. For example:

  • Fruit
    • Apples
    • Bananas
  • Vegetables

See how the inner list sits under the Fruit item? That’s a nested unordered list, which is handy when you want a multi-level hierarchy without implying any order.

UL vs OL: when to pick which

You’ll also encounter an ordered list, created with the ol tag. It’s the go-to when the sequence matters—steps in a recipe, a numbered feature list, or a queue. The markup is nearly identical:

  1. First step
  2. Second step
  3. Third step

So, ul signals “these things are related, but not ranked.” ol signals, “these items have a defined order.” Your choice sets reader expectations, which matters for accessibility and clarity.

Accessibility matters (a quick detour you’ll thank yourself for later)

Screen readers and assistive tech rely on proper list structure to announce items in a meaningful way. Using ul for bullet-style lists and ol for ordered lists helps convey intent. When you nest lists, it’s helpful to maintain the logical order and ensure each item is a complete, readable unit. If you’re styling, avoid making changes that obscure the list’s structure—like removing bullet markers without replacing them with something that signals a list, which can be confusing to users who rely on assistive tech.

Styling lists with CSS: a few practical knobs

The default bullet bullets are charming but sometimes you want a cleaner look, a different bullet shape, or even no bullets at all for a modern card interface. Here are a few approachable tricks:

  • Changing bullet style: You can swap the bullets for different markers using list-style-type. For example, square, circle, or even none for a clean line.

  • Custom bullets: You can replace bullets with images or icons using a combination of list-style: none and a pseudo-element, enabling you to show a tiny icon before each item.

  • Spacing and alignment: Padding and margin on ul, li, or the containing element let you control how roomy the list feels. Subtle gaps can improve readability, especially on mobile.

  • Indentation: The browser’s default indentation can feel a tad heavy in long lists. You can fine-tune it with padding-left or margin-left, depending on the design.

A practical design pattern: clean navigation menus

Many sites leverage unordered lists to build navigation bars. A common pattern is:

Here, the list semantically groups the navigation links. In a real-world scenario, you’d layer in CSS to horizontalize the items, hover states, and responsive behavior. The beauty is that the underlying HTML keeps the structure meaningful even if CSS tweaks change the visual presentation.

Nested lists: organizing complex content gracefully

Let’s say you’re building a site that catalogs courses, modules, and topics. A nested unordered list can mirror that relationship cleanly:

  • Web Development
    • HTML & CSS
      • Semantic HTML
      • Accessible forms
    • JavaScript
      • ES6 features
      • DOM manipulation
  • Design
    • Typography
    • Color theory

This structure is readable to humans and parsable by machines. It’s a simple, honest way to present layered information without forcing readers to jump through hoops. And if you’ve ever created a sitemap or a quick reference guide, you know how lists can save you from a jumbled page.

A few pitfalls to sidestep (so your list stays friendly)

  • Don’t mix structural and presentational roles. Keep your HTML focused on semantics, and let CSS handle the look. If you need to change how the list appears, do it in CSS rather than rearranging the HTML to fake a different appearance.

  • Be mindful of accessibility. If your list is a menu, ensure keyboard navigation remains smooth. If an item expands to reveal more content, consider ARIA attributes and proper focus management to help assistive tech users.

  • Watch the nesting depth. Very deep hierarchies can become hard to scan. If a list starts turning into a small forest, it might be a sign to break it into sections or reorganize content for clarity.

A few practice thought exercises to solidify the idea

  • Compose a simple grocery list using ul and li. Try two variants: one with a basic list and another with a nested list for categories and items. Notice how the browser renders bullets and how the indentation changes with nesting.

  • Build a tiny navigation bar for a pretend site. Style it with CSS to lay the items horizontally, add hover effects, and test in a couple of browsers. The underlying HTML stays simple, but the user interface becomes polished.

  • Take a chunk of content from a page and turn a rambling paragraph into a small unordered list of key takeaways. It’s a good reminder that lists aren’t just decorative; they help readers skim and digest information quickly.

From concepts to real-world polish

Lists are one of those pragmatic tools that quietly power clarity. They help you present related ideas in a digestible, scannable format. Whether you’re sketching a quick reference, laying out site navigation, or outlining a content hub, ul and li work together to give readers a dependable structure.

If you ever feel that a page is getting a bit too text-heavy, consider whether a list could carry some of the weight. A well-placed unordered list can give readers a mental breath, a moment to regroup, and a clear path forward. It’s like offering a roadmap in a world that’s often busy and noisy—short, sweet, and to the point.

A final note that sticks

As you work with HTML, you’ll find that the simplest choices often carry the most weight. The unordered list is a dependable companion in that journey. It invites you to group, compare, and navigate with calm efficiency. And as you layer in CSS and perhaps sprinkle a touch of accessibility polish, you’ll see how this humble tag can feel like a quiet superpower—not flashy, but reliably effective.

Ready to experiment? Fire up a tiny page, drop in a ul with a handful of items, and play with a few CSS touches. See how the bullets shift, how items line up, and how nesting reveals additional layers of meaning. It’s small, but it’s a gateway to cleaner, more thoughtful web experiences.