Work & business

What Does the li Tag Mean in HTML?

In HTML, the li element defines a single list item. It is the building block for bulleted lists, numbered steps, and navigation menus.

THE MEANING, AT A GLANCE

In HTML, the 'li' tag stands for 'list item'. It is a fundamental web development element used to create individual items within a larger list structure. The tag must always be nested inside a parent list container, typically an unordered list for bullet points or an ordered list for numbers.

The Anatomy of a List Item

The list item tag is written as `<li>` in HTML. Like most HTML elements, it requires an opening tag `<li>` and a closing tag `</li>`. The text, images, or links that you want to display on your webpage go between these two tags.

By itself, a list item tag does not provide enough context for the browser to render it correctly. It is a child element, meaning it relies on a parent element to define its formatting. If you simply place an `<li>` tag randomly in your code, the browser might render it as plain text with a default bullet, but it violates structural rules and can cause layout issues.

Pairing with Parent Tags

To use the list item tag properly, you must nest it inside one of three parent list elements. The most common is the unordered list `<ul>`, which displays the list items with bullet points. This is standard for features lists, ingredient lists, or general groupings of items where sequence does not matter.

The second option is the ordered list `<ol>`. When you place `<li>` tags inside an ordered list, the browser automatically numbers them sequentially (1, 2, 3...). This is vital for step-by-step instructions, rankings, or legal documents.

The third, less common option is nesting list items inside a menu `<menu>` tag, which is functionally similar to an unordered list but is semantically used for interactive menu controls.

The Importance of Semantic HTML

While you could visually create a list using simple paragraphs and typing a dash or number before each sentence, using the actual `<li>` tag is critical for accessibility. Screen readers used by visually impaired users rely on proper HTML tags to understand page structure.

When a screen reader encounters a properly coded list, it will announce 'List with 5 items' before reading the first bullet. This gives users immediate context about how the information is organized, which is completely lost if you fake the list using basic text styling.

Lists Beyond Bullets: Navigation Menus

One of the most widespread uses of the `<li>` tag has nothing to do with traditional bullet points. Almost every modern website navigation bar is built using unordered lists. Web developers nest links `<a>` inside `<li>` tags, and then use Cascading Style Sheets (CSS) to remove the bullet points and display the list horizontally.

This approach ensures that the navigation remains logically grouped as a list of links for search engines and assistive technologies, even if it looks like a sleek row of buttons visually.

FROM DEFINITION TO EVERYDAY LIFE

What it looks like in real life

01

Creating an Unordered List

If you are writing a recipe blog, you would list the ingredients using a `<ul>` tag. Inside that tag, you write `<li>2 cups of flour</li>` and `<li>1 cup of sugar</li>`. The browser will render these as a neat, bulleted list.

02

Creating an Ordered List

For a DIY tutorial, order matters. You use an `<ol>` tag. You write `<li>Measure the wood.</li>` followed by `<li>Cut the wood.</li>`. The browser automatically places a '1.' before the first item and a '2.' before the second.

03

Nesting Lists

You can put lists inside of lists. Inside an `<li>` tag detailing 'Fresh Fruit', you can open a new `<ul>` tag and add `<li>Apples</li>` and `<li>Bananas</li>`. This creates a sub-bullet list.

A few questions you might have

Do I have to close the li tag?+

While modern web browsers are highly forgiving and will often close an unclosed `<li>` tag for you, it is considered bad practice. Always use the closing `</li>` tag to prevent layout bugs and ensure strict code validation.

Can I put a link inside a list item?+

Yes. You can nest almost any HTML element inside an `<li>` tag, including links `<a>`, images `<img>`, strong text, and even other entire lists.

How do I change the bullet style of a list item?+

You change the bullet style using CSS. By applying the 'list-style-type' property to either the parent list or the specific `<li>`, you can change standard bullets to squares, circles, roman numerals, or remove them entirely.

Go a little deeper

References and further reading for this guide.

MDN Web Docs: <li>: The List Item elementW3Schools: HTML li Tag
BEHIND THE WORDS

Theirpedia Editorial

We make words and ideas easier to understand, with thoughtful explanations and examples from everyday life. Our publishing process uses AI-assisted writing; explore the references to learn more.

Our editorial approach

Every guide in Theirpedia is created through dedicated research and editorial review. Cultural and semantic context may vary across traditions and perspectives. Read our editorial policy.

KEEP THE CURIOSITY GOING

There’s more to discover.

Work & business01

UX UI Designer Meaning: What the Role Really Involves

A UX UI designer blends user experience research with interface design. Learn what the title means, how the two disciplines differ, and what to expect from the role.

7 min readExplore meaning β†—
Work & business02

UI/UX Designer Meaning: What the Role Actually Covers

The combined title UI/UX designer usually describes one person who handles both how a digital product works and how it looks. This guide breaks the two halves apart, explains where companies split or merge them, and shows how the role differs from graphic d...

8 min readExplore meaning β†—
Work & business03

What is Front-End Development? Meaning, Languages, and Skills

Front-end development is the process of building the visible interfaces of a website or application, focusing on design, layout, and user interaction.

4 min readExplore meaning β†—