Unit 1 home
FSWD · MERN CLASS 5 / 48 60-MIN SESSION FIRST CLASS AFTER LAB 1
CLASS 5 · P 1/12PGDN NEXT LINE / POINT · PGUP BACK
UNIT 1 · WEB BASICS, HTML & CSS PART A · CLASS 5 OF 12 UI23PC510CS · THEORY

Today's craft

Tables — tabular data, not layout.

Last week you shipped a real three-page site and pushed it to GitHub. Today your pages learn to hold rows and columns: prices, timetables, marksheets — data whose meaning lives in its grid position. One warning comes with the power, and it's the first thing on the agenda.

Walk out of this room able to…

Build any data table from <table>, <tr>, <td> and <th>
Read the old bgcolor era — and answer its 2-mark exam question
Merge cells across columns and rows with colspan / rowspan
Spot table misuse in the wild — and say why it's wrong
THE HOUR, POINT BY POINT
01Warm-up — where your project stands after Lab 1IDEA
02Why tables exist — and the one thing they're not forIDEA
03Anatomy: <table>, <tr>, <td>, <th> — built one row at a timeIDEA
04The bgcolor era — deprecated attributes & the exam question that keeps them aliveIDEA EXAM Q
05Fill in the code — complete the Poshtik price tableTRY IT
06Price table — worked solutionSOLUTION
07colspan & rowspan — merging cellsIDEA
08Predict the render — a table with a colspanTRY IT
09Predict the render — worked solutionSOLUTION
10Self-study — <caption> and scope, tables that screen readers can readSELF-STUDY
11When NOT to use a table — a real-world mistake galleryIDEA
12Close — what you can do now, homework, exit ticketWRAP
BEFORE WE START · YOUR REPO FROM LAB 1

Last session ended with poshtik-campus/ pushed to your own GitHub repo. Today's practice files are throwaway single-file demos in your sandbox folder — but the habit still runs. Whenever today's homework touches a file worth keeping, close with the full sequence you learned in Lab 1:

git add . # stage everything you changed
git commit -m "docs(class05): table practice" # save the checkpoint
git push # and it's safely on GitHub
Sandbox for today: fswd-practice\class-05\

Same discipline as Classes 3 and 4: every demo you type today lives in its own class folder inside fswd-practice\. Your poshtik-campus\ project folder from Lab 1 stays untouched until Lab 2 — these files stay on your disk, and Class 6 continues from here.

Idea one

Some data is grid-shaped. HTML has a tag family for exactly that.

Look at the Poshtik Campus counter board: dish on the left, price on the right. Your marksheet: subject, internal, external, total. A train timetable: train, platform, departure. In each one, the meaning lives in the alignment — a price belongs to its dish because they share a row. Paragraphs and lists can't say that. Tables can.

What a table IS for

Tabular data — values whose meaning depends on both their row and their column. A menu price list. Attendance against roll numbers. Anything you'd naturally reach for a spreadsheet to hold. If the question "what column is this value in?" makes sense, it's table material.

What a table is NOT for

Page layout. In the 1990s, whole websites were built as one giant invisible table — navigation in one cell, content in another. It worked, badly: unreadable code, broken phones, invisible to screen readers. CSS replaced that job completely. Part 11 shows you those old broken pages so you never repeat the mistake.

The one-sentence test, worth memorising.

Before you type <table>, ask: "if I pasted this into a spreadsheet, would every column have a heading?" Yes? It's tabular data — table away. No? You're about to misuse a table for layout, and CSS (from Class 9 onward) is the tool you actually want.

DEPTH FOR THE CURIOUS · WHY THE MISUSE MATTERED

Layout tables broke three things at once. Accessibility: a screen reader announces a table as data — "row 2, column 3" — which is gibberish when the "cell" is actually your navigation bar. Responsiveness: a fixed grid can't reflow to a phone screen; the 90s web was unreadable on early mobiles largely because of layout tables. Maintenance: changing a layout meant re-nesting tables inside tables inside tables. When CSS arrived with real layout tools, the industry spent a decade digging itself out. The tag family survived because its honest job — actual data — never went away.

Idea two

Four tags, three layers: table · row · cell.

A table is a box of rows; a row is a box of cells. That's the entire mental model. <table> opens the grid, each <tr> (table row) lays down one horizontal strip, and inside it every <td> (table data) or <th> (table heading) is one cell. Columns are never written — the browser infers them from how the cells stack up.

THE NESTING, DRAWN
<table> … </table>
<tr> — heading row
<th>Dish<th>Price
<tr> — data row 1
<td>Jonna Rotte Wrap<td>₹60
<tr> — data row 2
<td>Ragi Idli Bowl<td>₹50
TD vs TH — THE ONLY DECISION PER CELL

<th> = this cell labels other cells. Browsers render it bold and centred by default — but the real point is meaning: it tells the browser (and a screen reader) "this is a column's name, not a value".

<td> = this cell holds a value. Regular weight, left-aligned. Nearly every cell you'll ever write is a <td> — the <th>s usually live only in the first row.

Type it with me — the counter board becomes a table

MINI PROBLEM · PRICE-BOARD.HTML
PROBLEM
Turn the counter's price board into your first real HTML table: one heading row naming the columns, two data rows holding actual dishes and prices — and let the browser build the columns itself.
REQUIRE­MENTS
  • Save as price-board.html inside class-05 · title text: Poshtik Campus · Price Board
  • <table border="1"> so the grid lines are visible while you learn
  • Row 1: <th> cells Dish and Price · rows 2–3: <td> cells with a dish and its ₹ price
EXPECTED OUTPUT
A bordered 3×2 grid: bold, centred column names over two neatly aligned dish rows — columns you never typed, lined up by the browser counting cells per row.
class-05/price-board.htmlBUILDS ONE LINE PER PRESS
1<!DOCTYPE html>
2<html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <title>Poshtik Campus · Price Board</title>
6 </head>
7 <body>
8 <h1>Today's Prices</h1>
9 <table border="1">
10 <tr>
11 <th>Dish</th>
12 <th>Price</th>
13 </tr>
14 <tr>
15 <td>Jonna Rotte Wrap</td>
16 <td>₹60</td>
17 </tr>
18 <tr>
19 <td>Ragi Idli Bowl</td>
20 <td>₹50</td>
21 </tr>
22 </table>
23 </body>
24</html>
Poshtik Campus · Price Board
file:///C:/Users/student/Desktop/fswd-practice/class-05/price-board.html
Today's Prices
DishPrice
Jonna Rotte Wrap₹60
Ragi Idli Bowl₹50
Watch what you never typed: columns. The browser lined up "Dish" over both dish names by counting cells per row. And the <th> cells came out bold and centred with zero styling — that's default browser rendering signalling "heading".
SAVE THIS AS
FOLDERC:\Users\student\Desktop\fswd-practice\class-05\
FILENAMEprice-board.html
THENDouble-click it. Add a third dish row yourself — Millet Protein Shake at ₹45 — save, refresh. Three keystroke groups, one new row: that's the rhythm of table work.
About that border="1".

Without it, today's table renders with no visible lines at all — modern tables get their looks from CSS, which starts in Class 9. border="1" is a legacy attribute we use for exactly one honest purpose: seeing our grid while we learn its structure. It's also the perfect bridge to the next part — because it's not the only legacy table attribute exams still ask about.

Idea three

The bgcolor era — old attributes, live exam marks.

Before CSS existed, colour was painted straight into HTML attributes: bgcolor on a table or row set its background, and text colour came from a page-level text attribute or a <font color> wrapper. The modern web deprecated all of it — we'll do this properly with CSS soon — but your exam paper still asks for the old way, so you'll learn to read and write both.

MINI PROBLEM · OLD-STYLE-TABLE.HTML
PROBLEM
Write a table the 1990s way — colour painted straight into the structure with bgcolor — so you can read the old web when your exam (and real legacy code) puts it in front of you.
REQUIRE­MENTS
  • Save as old-style-table.html inside class-05 · title text: Old-Style Table
  • <table border="1" bgcolor="lightyellow">
  • Heading row with its own bgcolor="orange", then one data row: a dish and its ₹ price
EXPECTED OUTPUT
A lightyellow table whose heading row is orange — rendered by every modern browser, because deprecated ≠ broken. Notice the cost: the colour lives inside the structure, one edit per row to change it.
class-05/old-style-table.html · the whole fileBUILDS ONE LINE PER PRESS
1<!DOCTYPE html>
2<html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <title>Old-Style Table</title>
6 </head>
7 <body>
8 <table border="1" bgcolor="lightyellow">
9 <tr bgcolor="orange">
10 <th>Dish</th><th>Price</th>
11 </tr>
12 <tr>
13 <td>Pesarattu with Sprouts</td><td>₹55</td>
14 </tr>
15 </table>
16 </body>
17</html>
Old-Style Table
file:///C:/Users/student/Desktop/fswd-practice/class-05/old-style-table.html
DishPrice
Pesarattu with Sprouts₹55
It works — every browser still honours bgcolor for compatibility with the old web. But note where the colour lives: inside the structure. Change your mind about orange, and you edit every single row. That maintenance pain is exactly why CSS took this job away.
SAVE THIS AS
FOLDERC:\Users\student\Desktop\fswd-practice\class-05\ — same folder as price-board.html; every file today lives there.
FILENAMEold-style-table.html
VIEW ITDouble-click it — lightyellow table, orange heading row, exactly as the preview shows.
GIT?No commit — sandbox scratch. Git only ever watches poshtik-campus\, and that folder doesn't change today.
DEPTH FOR THE CURIOUS · "DEPRECATED" IS A PRECISE WORD

Deprecated does not mean broken. It means the standards body (the W3C/WHATWG) has marked the feature "kept for old pages, do not use in new ones" — browsers must keep rendering it because millions of 1990s pages still exist. So bgcolor will render in 2026 and beyond; it's just professionally embarrassing in new code. When a job interviewer sees it in your markup, they read "learned HTML from a very old book". When an examiner asks for it, they're testing whether you can read the old web — a genuinely useful skill, since real codebases carry old code for decades.

HOW THIS IS ASKED IN YOUR EXAM PAPER 1 · Q1 2 MARKS
old attributes — asked as-is!

Q. Write HTML code to create a table with Roll No, Name and Dept columns, using bgcolor and text colour attributes. [2M]

model answer — pyq-roll-table.html · the whole fileONE POINT PER PRESS
1<!DOCTYPE html>
2<html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <title>Roll List</title>
6 </head>
7 <body text="navy">
8 <table border="1" bgcolor="lightblue">
9 <tr bgcolor="yellow">
10 <th>Roll No</th><th>Name</th><th>Dept</th>
11 </tr>
12 <tr><td>1602-25-733-001</td><td>P. Ananya</td><td>CSE</td></tr>
13 <tr><td>1602-25-733-014</td><td>B. Rohan</td><td>CSE</td></tr>
14 <tr><td>1602-25-737-027</td><td>K. Sruthi</td><td>IT</td></tr>
15 <tr><td>1602-25-735-032</td><td>M. Arjun</td><td>ECE</td></tr>
16 <tr><td>1602-25-734-046</td><td>S. Fathima</td><td>EEE</td></tr>
17 </table>
18 </body>
19</html>
Roll List
file:///C:/Users/student/Desktop/fswd-practice/class-05/pyq-roll-table.html
Roll NoNameDept
1602-25-733-001P. AnanyaCSE
1602-25-733-014B. RohanCSE
1602-25-737-027K. SruthiIT
1602-25-735-032M. ArjunECE
1602-25-734-046S. FathimaEEE
Exactly what the examiner's mental render is: lightblue table body, yellow heading row, navy text everywhere — every colour traceable to one attribute in the code above. Type the answer file yourself and confirm your browser shows this same table.
SAVE THIS AS
FOLDERC:\Users\student\Desktop\fswd-practice\class-05\
FILENAMEpyq-roll-table.html — typing the exam answer as a real file is the fastest way to own it.
VIEW ITDouble-click it and confirm the lightblue/yellow/navy render matches the preview.
GIT?No commit — exam practice stays in the sandbox.

bgcolor on <table> or <tr> sets the background colour; the foreground (text) colour comes from the text attribute on <body> (or a <font color> wrapper). Both are deprecated in HTML5 — the modern method is CSS — but they remain valid to write and are what this question asks for.

<table bgcolor="lightblue"> <tr bgcolor="yellow"> <body text="navy"> Roll No · Name · Dept 1602-25-733-001 · P. Ananya 1602-25-733-014 · B. Rohan …three more rows… whole grid heading row only every letter of text
THREE ATTRIBUTES → THREE REGIONS · EACH ARROW = ONE TRACEABLE COLOUR · SCOPE SHRINKS: PAGE → TABLE → ROW

Beyond the marks: notice the scope ladder the diagram exposes — text on the body paints the whole page, bgcolor on the table paints one grid, bgcolor on a row overrides it for that row alone. Nearest ancestor wins — the same cascade instinct CSS formalises in Class 9. Understand it here and the CSS specificity lesson becomes a re-run, not a surprise.

working table + both colour attributes named = full 2 marks ✓ — the diagram and scope note are course depth, past the marks on purpose

DEPTH FOR THE CURIOUS · THE SHAPE OF A 2-MARK CODE ANSWER

A table answer must look like a table: one heading row plus a handful of real data rows — five is a safe count — so the examiner sees the row pattern repeating, not a one-row skeleton. Keep every attribute the question names, keep the data plausible (real roll-number format, real departments), and close with a one-line sentence naming the attributes — when a question says "using bgcolor", make the word visibly present in both your code and one sentence, so the marks are impossible to miss.

FILL-IN-CODE ACTIVITY · 6 MINUTES · ON PAPER OR IN YOUR SANDBOX

Complete the Poshtik price table.

Below is the menu table for the Poshtik Campus counter — with four holes where structure should be. Each dashed line names what belongs there. Fill all four, then (in your sandbox) type the whole file and check it renders as a clean 2-column, 4-row grid.

class-05/menu-table.html · the whole fileFOUR GAPS TO FILL
1<!DOCTYPE html>
2<html>
3 <head>
4 <meta charset="UTF-8">
5 <title>Poshtik Menu</title>
6 </head>
7 <body>
8 <h1>Poshtik Campus Menu</h1>
9① open the table — with a visible border
10 <tr>
11② two HEADING cells: Dish · Price
12 </tr>
13 <tr>
14 <td>Ragi Sangati Bowl</td><td>₹55</td>
15 </tr>
16③ a full data row: Gongura Sprouts Salad · ₹50
17 <tr>
18 <td>Millet Protein Shake</td><td>₹45</td>
19 </tr>
20④ close the table
21 </body>
22</html>
Poshtik Menu
file:///C:/Users/student/Desktop/fswd-practice/class-05/menu-table.html
Poshtik Campus Menu
DishPrice
Ragi Sangati Bowl₹55
Gongura Sprouts Salad₹50
Millet Protein Shake₹45
This is what your finished file must render. Gap ③ is the one that catches people — a "full data row" is three tags' worth of typing, not one.
SOLUTION SHEET · PRICE TABLE

The four gaps, filled and explained.

Honesty rule from Class 3 still applies: attempt first, check second.

menu-table.html · the whole file · SOLVEDBUILDS ONE LINE PER PRESS
1<!DOCTYPE html>
2<html>
3 <head>
4 <meta charset="UTF-8">
5 <title>Poshtik Menu</title>
6 </head>
7 <body>
8 <h1>Poshtik Campus Menu</h1>
9 <table border="1"> ← ①
10 <tr>
11 <th>Dish</th><th>Price</th> ← ② th, not td
12 </tr>
13 <tr><td>Ragi Sangati Bowl</td><td>₹55</td></tr>
14 <tr><td>Gongura Sprouts Salad</td><td>₹50</td></tr> ← ③
15 <tr><td>Millet Protein Shake</td><td>₹45</td></tr>
16 </table> ← ④
17 </body>
18</html>
Poshtik Menu
file:///C:/Users/student/Desktop/fswd-practice/class-05/menu-table.html
Poshtik Campus Menu
DishPrice
Ragi Sangati Bowl₹55
Gongura Sprouts Salad₹50
Millet Protein Shake₹45
Lines 13–15 show a style choice you'll see in real code: a short row written on one line. The browser doesn't care — nesting is defined by tags, not line breaks. Choose whichever your eyes parse faster; be consistent.
SAVE THIS AS
FOLDERC:\Users\student\Desktop\fswd-practice\class-05\
FILENAMEmenu-table.html — same folder as every other Class 5 throwaway file.
VIEW ITDouble-click it — a bordered 4-row grid with a bold heading row must appear.
GIT?No commitfswd-practice\ is the sandbox; it is not a git repo. Commits only happen inside poshtik-campus\.
Marking your own work — the three classic slips
  1. ② as <td>: renders almost right — just not bold. That "almost" is the point: structure said "these are values", and only default styling hid the error. A screen reader would read the table wrong.
  2. ③ missing the <tr> wrapper: two bare <td>s outside a row get rescued unpredictably by the browser — often gluing themselves onto the previous row, making a 4-column mess.
  3. ④ forgotten entirely: the browser silently auto-closes at </body>, so it looks fine — until you add a paragraph after the table and it lands inside it. Unclosed containers fail later, not where the bug is.

Idea four

Merged cells: colspan reaches right, rowspan reaches down.

Real tables aren't always perfect grids. A "MILLET DISHES" banner sits above two columns at once; a category name applies to three rows of dishes. HTML handles both with one idea: a cell can claim more than one grid slot — and every cell it swallows must then NOT be typed.

<ththe cell being stretched   colspan"span this many columns" = "2"how many slots it claims > Millet Dishesone cell, two columns wide </th>

Watch the row arithmetic as it builds

class-05/category-menu.html · body onlyBUILDS ONE LINE PER PRESS
1 <table border="1">
2 <tr>
3 <th colspan="2">Millet Dishes</th> ← claims BOTH columns
4 </tr> ← so this row types only ONE cell
5 <tr>
6 <td rowspan="2">Wraps</td> ← claims this row AND the next
7 <td>Jonna Rotte Wrap · ₹60</td>
8 </tr>
9 <tr>
10 <td>Sajja Roti Wrap · ₹60</td> ← NO first cell here — Wraps still owns it
11 </tr>
12 </table>
Category Menu
file:///C:/Users/student/Desktop/fswd-practice/class-05/category-menu.html
Millet Dishes
WrapsJonna Rotte Wrap · ₹60
Sajja Roti Wrap · ₹60
Count cells per row in the code: 1, 2, 1. Count visible slots per row: 2, 2, 2. The difference is exactly what the spans claimed. That arithmetic — typed cells + claimed slots = column count — is the whole skill.
SAVE THIS AS
FOLDERC:\Users\student\Desktop\fswd-practice\class-05\
FILENAMEcategory-menu.html — the panel shows the body only; wrap it in the full skeleton before saving.
VIEW ITDouble-click it — the Millet Dishes band across the whole top, Wraps holding two rows on the left. Then run the row arithmetic against your own render.
GIT?No commitfswd-practice\ is the sandbox; it is not a git repo.
The classic span bug: typing the swallowed cell anyway.

If you give row 3 its own first <td> while rowspan="2" is still claiming that slot, the browser shoves the extra cell rightward, growing a phantom third column. If a merged table ever renders with cells jutting out the side, count your spans first — someone typed a cell a span already owned.

PREDICT-THE-RENDER ACTIVITY · 5 MINUTES · PAPER ONLY, NO BROWSER

Draw this table before the browser does.

Read the code. On paper, sketch the exact grid it renders: how many columns, how many rows, and which cells are merged. Only then check against the solution. This is the skill exams test with span questions — running the browser in your head.

mystery-table.html · body onlyREAD · DON'T RUN
1 <table border="1">
2 <tr>
3 <th>Dish</th><th>Small</th><th>Large</th>
4 </tr>
5 <tr>
6 <td>Ulava Charu Bowl</td><td>₹70</td><td>₹95</td>
7 </tr>
8 <tr>
9 <td>Paneer Protein Bowl</td><td colspan="2">₹80 · one size only</td>
10 </tr>
11 </table>
Your three predictions, on paper:
  1. How many columns does the grid have — and which line proves it?
  2. Row 3 types only two cells. Why doesn't it render narrower than the rows above it?
  3. Sketch the final grid, drawing the merged cell as one wide box. Where exactly does the merge sit?
SOLUTION SHEET · PREDICT THE RENDER

The grid, revealed.

A prediction you can't get wrong teaches nothing — commit to the sketch first.

mystery-table.html — rendered
file:///C:/Users/student/Desktop/fswd-practice/class-05/mystery-table.html
DishSmallLarge
Ulava Charu Bowl₹70₹95
Paneer Protein Bowl₹80 · one size only
A 3-column grid; the last row's second cell stretches across the Small and Large columns as one wide box.
The three answers, reasoned:
  1. Three columns. Line 3 proves it — the heading row types three <th> cells with no spans, and the widest row defines the grid.
  2. Because of the arithmetic: row 3 types 2 cells, but one carries colspan="2". Typed cells (2) + extra claimed slots (1) = 3 slots — exactly the grid width. The row is full; nothing is narrow or missing.
  3. The merge sits under Small + Large, second and third columns of the last row, holding "₹80 · one size only" as one centred-content box. If your sketch put the wide cell under "Dish", re-check: the span starts where the cell is typed — after the Paneer cell, so slot 2 onward.
SAVE THIS AS — ONLY AFTER YOUR SKETCH IS MARKED
FOLDERC:\Users\student\Desktop\fswd-practice\class-05\
FILENAMEmystery-table.html — body only in the activity's panel; wrap it in the full skeleton, bug-free and exact.
VIEW ITDouble-click it and hold your paper sketch next to the browser — the grid must match box for box, merge for merge.
GIT?No commit — prediction practice stays in the sandbox.
DEPTH FOR THE CURIOUS · WHY EXAMINERS LOVE THIS QUESTION SHAPE

"Predict the render" span questions test three layers at once with five lines of code: do you know the tags, do you know the span attributes, and can you simulate the browser's cell-placement algorithm mentally? When you meet one in an exam, always write the column count first (from the widest un-spanned row), then place each row's cells left to right, skipping slots that a rowspan from above still owns. Method marks live in that visible working.

SELF-STUDY · AFTER CLASS · AT YOUR OWN PACE

Two small additions that make tables readable to everyone.

Neither of these changes how a table looks — they change what it means to software that reads pages aloud. Ten minutes of self-study; both will quietly reappear when Class 8 makes semantics the whole lesson.

accessible-table.html · body onlySTEP THROUGH AT YOUR PACE
1 <table border="1">
2 <caption>Poshtik Campus — today's prices</caption>
3 <tr>
4 <th scope="col">Dish</th>
5 <th scope="col">Price</th>
6 </tr>
7 <tr>
8 <th scope="row">Sprouts Moong Chilla</th>
9 <td>₹50</td>
10 </tr>
11 </table>
Accessible table
file:///C:/Users/student/Desktop/fswd-practice/class-05/accessible-table.html
Poshtik Campus — today's prices
DishPrice
Sprouts Moong Chilla₹50
The caption renders as a centred title attached to the table itself; scope renders as nothing at all — it exists purely for assistive software.
SAVE THIS AS
FOLDERC:\Users\student\Desktop\fswd-practice\class-05\
FILENAMEaccessible-table.html — the self-study file; body only above, so wrap it in the full skeleton.
VIEW ITDouble-click it — the caption renders as a centred title; scope renders as nothing, and that's correct.
GIT?No commit — self-study practice lives in the sandbox, outside git.
ADDITIONWHAT IT DOESWHO IT'S FOR
<caption>Names the whole table, as its first child. Unlike a heading typed above the table, the caption is programmatically attached — software knows this title belongs to this grid.Screen-reader users hear it announced on entering the table; search engines index the table's purpose.
scope="col"Declares a <th> as the label for its column.Lets a screen reader announce "Price: ₹50" instead of just "₹50" when a user navigates into a data cell.
scope="row"Declares a <th> as the label for its row — used when the first cell of each row names the row, as dish names do here.Same announcement benefit, horizontal direction: "Sprouts Moong Chilla — Price: ₹50".
Why bother, honestly?

Because "works for me" isn't "works". A table without scope is a maze read cell by cell to a blind user; with two attributes it becomes navigable data. It costs you seconds, it's what separates professional markup from homework markup — and Class 8's accessibility audit will expect you to already have the habit.

Idea five · the promised warning, kept

The mistake gallery — tables doing jobs they were never meant for.

Every misuse below is real — pulled from the kinds of pages you can still find with view-source today. For each: what someone built, why it feels reasonable, and what the correct tool actually is. Apply the one-sentence test from Part 2 to each and it flags every fake.

The whole-page layout table

One giant borderless table: nav bar in the top cell, sidebar left, content right, footer bottom. Feels reasonable because: it aligns! Why it's wrong: none of it is data — no column has a heading. A screen reader announces your homepage as a spreadsheet. Right tool: CSS layout (Classes 10–12).

The image-slicing table

A designer's banner cut into six image tiles, reassembled in a 2×3 table so the slices butt together. Feels reasonable because: it pixel-aligns perfectly — in one browser, at one zoom. Why it's wrong: zoom in and the seams split apart. Right tool: one whole image with proper alt text (Class 3 taught you this).

The form-alignment table

Labels in the left column, input boxes in the right, so the form looks tidy. Feels reasonable because: forms genuinely want that alignment. Why it's wrong: a label and its input are a relationship, not a data row — and Classes 6–7 will give you <label for>, the tag built for exactly that relationship. Alignment comes from CSS.

And one that IS a table — the exam timetable on your department notice board

Date column, subject column, session column. Every column has a heading; every value's meaning depends on its row and column. Paste-into-a-spreadsheet test: passes instantly. Table, with a clear conscience — and with scope="col" if you did the self-study.

The takeaway, one line long.

Tables describe data, CSS describes appearance. Every misuse above is someone using structure to fake appearance — and every one of them stops being tempting the moment CSS enters your toolkit, four classes from now.

Closing

You can now hold a grid in your head — and in your markup.

Build any data table from  table · tr · td · th  and explain why columns are never typed
Write the deprecated  bgcolor  style on demand — worth 2 marks, Paper 1 Q1
Merge cells with  colspan / rowspan  and do the typed-cells arithmetic that keeps grids rectangular
Judge any table in the wild: honest data, or layout in disguise

Your folders after today — the cumulative map

FSWD-PRACTICE — CUMULATIVE TREE · CHECK BEFORE YOU LEAVE
Desktop\fswd-practice\ <- sandbox · NOT a git repo · never committed
├─ class-02\ hello.html · previous, unchanged
├─ class-03\ skeleton.html · headings.html · … (7 files + assets\)
├─ class-04\ anchor-demo · mini-site\ · menu-full\ · activities\
└─ class-05\ <- created today
├─ price-board.html
├─ old-style-table.html
├─ menu-table.html
├─ category-menu.html
├─ mystery-table.html
├─ accessible-table.html (self-study file)
└─ timetable.html (homework file)
Desktop\poshtik-campus\ <- real project · IS a git repo · index · menu · about — unchanged today
WHEN DOES GIT COME IN TODAY?

During class: never. All seven files above live in the sandbox — scratch paper, no repo, no commits. At home: once, and only if you copy your timetable into poshtik-campus\ (the homework's third card) — a real-project change always ends with the Lab-1 ritual:

git add .
git commit -m "docs: class 5 timetable practice" # one honest sentence
git push

Before Class 6

BUILD · YOUR OWN TIMETABLE

Your real class timetable as an HTML table:

  • Days as rows, periods as columns.
  • At least one lecture block spans two periods — that's a colspan earning its keep.
  • Save as class-05\timetable.html.
HUNT · A TABLE IN THE WILD

Find one real table on any site after class — cricket scorecard, train timetable, marks portal. Ctrl+U and check: did they use <th>? A <caption>? scope? Grade them against today's class.

PUSH · THE LAB-1 HABIT

If your homework timetable file is worth keeping (it is), put a copy in your repo folder and run the ritual: git add ., then git commit -m "docs: class 5 timetable practice", then git push.

EXIT TICKET · ANSWER BEFORE YOU LEAVE

A friend shows you a page where the navigation menu is built as a one-row table, "because the links line up perfectly". In two sentences: what test proves this is table misuse, and what will replace it once you both reach Class 9?