Creating a Nested List in HTML
📖 Scenario: You are building a simple webpage that shows a grocery list. Some items have sub-items to buy, so you want to show them as nested lists.
🎯 Goal: Create an HTML page with a nested list showing main grocery categories and their sub-items.
📋 What You'll Learn
Use semantic HTML5 structure with
<main> and <section> tagsCreate an unordered list
<ul> with nested <ul> inside list itemsUse proper indentation for readability
Include a page title inside
<header>Make sure the HTML is valid and renders correctly in a browser
💡 Why This Matters
🌍 Real World
Nested lists are common in menus, outlines, and categorized data on websites. Learning to create them helps you organize information clearly.
💼 Career
Web developers often build navigation menus and content lists that require nested lists. Understanding this helps in creating accessible and well-structured web pages.
Progress0 / 4 steps