LESSON 04 / 04

Lists & Tables

Organise content with bullet lists, numbered lists and tables with headers — the right tag for the right job.

🎓Beginnerlevel
⏱️30 minto finish
✏️2activities

📂 HTML: The Structure🏷️ HTML

🎯 By the end of this lesson you can…

  • Build ordered and unordered lists
  • Nest lists
  • Build tables with headers
🌐 HTML · CSS · JS lists.html 👆 Tap a line to explain it
1<h3>Shopping list</h3>2<ul>3  <li>Milk</li>4  <li>Bread</li>5  <li>Fruit6    <ul>7      <li>Mango</li>8      <li>Banana</li>9    </ul>10  </li>11</ul>12<h3>Making tea</h3>13<ol>14  <li>Boil water</li>15  <li>Add tea leaves</li>16  <li>Add milk and sugar</li>17</ol>
🌐 HTML · CSS · JS table.html 👆 Tap a line to explain it
1<style>2  table { border-collapse: collapse; font-family: system-ui; }3  th, td { border: 1px solid #ccc; padding: 6px 12px; }4  th { background: #f2efff; }5</style>6<table>7  <caption>Class timetable</caption>8  <thead>9    <tr><th>Day</th><th>9:00</th><th>10:00</th></tr>10  </thead>11  <tbody>12    <tr><td>Monday</td><td>Maths</td><td>Science</td></tr>13    <tr><td>Tuesday</td><td>English</td><td>Art</td></tr>14  </tbody>15</table>
💡 Concept check
Which tag makes a numbered list?
🛠️ Recipe card

Build a recipe card: an h2 with the dish name, an h3 Ingredients followed by a bullet list of 3 ingredients, and an h3 Steps followed by a numbered list of 3 steps.

📌 Key takeaways

  • <ul> bullets, <ol> numbers; each item is an <li>.
  • Tables: <table> → rows <tr> → header cells <th> / data cells <td>.
  • Use tables for tabular data (timetables, prices), not for page layout.

Finished reading & practising?

Saved in this browser. Create a free account to keep it forever.