ul
A list where order does not change the meaning.
Learn HTML Lists with practical examples for tables, lists, structured data relationships, accessibility, SEO and live practice.
HTML data structures
HTML has three main list types: unordered lists, ordered lists and description lists. Each one says something different about the relationship between items.
A list is stronger than a row of paragraphs when the items belong together. It helps scanning, accessibility and maintainability.
Choose the list type based on meaning: unordered for collections, ordered for sequence or rank, description lists for terms and details.
A list where order does not change the meaning.
A list where order, sequence or ranking matters.
A list item inside ul or ol.
A description list for terms and their details.
Syntax and structure
Do not choose a list because of bullets or numbers. Choose it because of meaning, then style it with CSS.
<ul> <li>HTML structure</li> <li>CSS styling</li> <li>JavaScript behavior</li> </ul> <ol> <li>Create the document</li> <li>Add accessible content</li> <li>Test in the browser</li> </ol>
<p>- HTML structure<br>- CSS styling<br>- JavaScript behavior</p> <div>1. Create file<br>2. Add content<br>3. Test</div>
Rules that matter
Tables and lists are small elements with big structural value. They help users scan, compare, follow steps and understand how pieces of information belong together.
If items belong together, a list often communicates that relationship better than paragraphs.
Bullets, numbers and markers can be styled. The element should match the content.
ul and ol should contain li elements as their list items.
Deep nesting can become hard to scan.
Hyphens and numbers typed into paragraphs are weaker than real list markup.
Use CSS for marker appearance instead of changing the HTML meaning.
Production thinking
This matters because lists are one of the simplest ways to make content scannable without losing semantic structure.
Real lists announce the number of items and let assistive technology understand the group.
Navigation, feature lists, checklists, steps and metadata groups should use the correct list structure before styling.
Well-structured lists can improve readability and help search engines understand grouped information and step-by-step content.
Live code lab
Edit the HTML or CSS, then use Run to refresh the preview. The preview is isolated, so links and forms stay inside this practice area.
Mini assignment
Practice assignment
Try it yourself
Self-check
Do not only read this page. Answer these questions out loud or write the answers in your own notes. If one answer feels vague, revisit the examples before moving on.