Published Jul 1, 2022
Contribute to Docs

The <li> element represents a single list item. This element must be wrapped in an <ol>, <ul>, or <menu> element.


<li>Text for list item</li>

Content is required to be between the opening and closing <li> tags. It can hold any valid HTML, and each <li> element will be indented and preceded either with a number (for ordered lists), or a dot (for unordered lists and menus).


<!DOCTYPE html>
<head> </head>
<h3>My Favorite Things</h3>
<li>Rain drops on roses</li>
<li>Whiskers on kittens</li>
<li>Bright copper kettles</li>
<li>Warm woolen mittens</li>
<h3>To-do List</h3>
<li>Make bed</li>
<li>Brush teeth</li>
<li>Have breakfast</li>
<li>Continue learning HTML</li>

This will output the following;

Rendered <li> tag example

All contributors

Looking to contribute?

Learn HTML on Codecademy