Learn
🤖 AI Hub 📰 News 📖 Dictionary 🧰 Resources
Grow
💼 Jobs 🚀 Community 🏆 Challenges
Explore by Stage
🌑 Zero 📚 Learn 🔧 Practice 🏗 Build 🚀 Launch 💰 Earn
Account
Login Sign Up
🏗️HTML 🎨CSS ⚡JavaScript 🐙Git & GitHub ⚛️React Soon 📘TypeScript Soon 🐍Python 🗄️Database & SQL Soon 🌐Web Development Soon ☁️Cloud & DevOps Soon 🤖AI & ML Soon 📄Resume Prep Soon 🎤Interview Prep Soon 💼Freelancing Soon 🚀SaaS & Side Projects Soon 🤖Automation Soon
Beginner 🕑 3 min read 👁 3 views 📅 May 30, 2026

HTML Lists & Tables — Organising Data on a Page

Learn bullet lists, numbered lists, nested lists, and data tables in HTML with real-world examples like menus and price comparisons.

Unordered Lists — Bullet Points

Use <ul> when order does not matter (ingredients, features, skills):

<h3>What You Will Learn</h3>
<ul>
  <li>HTML structure</li>
  <li>CSS styling</li>
  <li>JavaScript interactivity</li>
  <li>React for modern apps</li>
</ul>

Ordered Lists — Numbered Steps

Use <ol> when sequence matters (steps, rankings, instructions):

<h3>How to Make Dal Makhani</h3>
<ol>
  <li>Soak black lentils overnight</li>
  <li>Pressure cook for 20 minutes</li>
  <li>Add butter, cream, and spices</li>
  <li>Simmer on low heat for 2 hours</li>
  <li>Serve with naan</li>
</ol>

Nested Lists — Menu with Categories

<ul>
  <li>Starters
    <ul>
      <li>Samosa — Rs.20</li>
      <li>Paneer Tikka — Rs.120</li>
    </ul>
  </li>
  <li>Main Course
    <ul>
      <li>Dal Makhani — Rs.150</li>
      <li>Butter Chicken — Rs.200</li>
    </ul>
  </li>
</ul>

Tables — Grid Data

Use tables for structured data with rows and columns — price comparisons, schedules, results:

TagCreates
<table>The table container
<tr>A table row
<th>Header cell (bold + centered by default)
<td>Data cell
<thead> / <tbody>Groups header vs data rows

Real Example — Pricing Table

<table>
  <thead>
    <tr>
      <th>Plan</th>
      <th>Price</th>
      <th>Best For</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Free</td>
      <td>Rs.0</td>
      <td>Self-learners</td>
    </tr>
    <tr>
      <td>Pro</td>
      <td>Rs.499/mo</td>
      <td>Fast learners</td>
    </tr>
  </tbody>
</table>
Do not use tables for layout! In the early 2000s developers used tables to position content. That is outdated and bad practice. Use CSS Flexbox or Grid for layout. Tables are only for tabular data.

Try It Yourself

  1. Create a food menu using nested lists with 3 categories
  2. Build a comparison table for 3 smartphones: Name, Price, Camera, Battery

❓ Frequently Asked Questions

An HTML table works without CSS, but you will want CSS to style it, for example to add borders, padding and colors.
Use a table for real tabular data, such as marks or prices. Use divs to build page layouts; using tables for layout is an outdated practice.
Was this lesson helpful?

🎯 Finished this lesson?

🔗 Related Tutorials
🤖 Got a Doubt? Ask AI
Get instant answers in Hindi or English
🤖
Z2T Bot
Online
Ask me anything about this tutorial — I'm here! 👋