ADVANCED CRASH COURSE · FAST-TRACK REVISION PATH · UNIT 1 ≈ 6 HOURS · 36 GUIDED CHUNKS
Course home
FSWD · MERN CRASH · UNIT 1 UI23PC510CS WEB BASICS · HTML5 · CSS — EXAM-READY IN ONE SITTING
01
SELF-PACED DEEP DIVE UNIT 1 · WEB BASICS · HTML5 · CSS ≈ 6 HOURS · 36 CHUNKS 17 PREVIOUS-YEAR QUESTIONS INSIDE

Chunk 1 · Unit snapshot · ≈5 min

The whole of Unit 1.
One sitting. Nothing cut.

This fast-track revision path compresses every concept, every worked example and every previous-year exam question from Unit 1 into 36 guided chunks. Each chunk teaches, shows working code line by line, quizzes you, and closes with a checkpoint you tick — the course map (bottom-left button) remembers where you are.

UNIT 1 · MODULE MAP — JUMP ANYWHERE, THE MAP TRACKS YOU
M0Unit snapshot + concept map — you are here10 MIN
M2How the web works — clients, servers, HTTP (opening your Amazon cart scenario)30 MIN
M3HTML skeleton, text, links & images ("Hyderabad Weekend" city guide)40 MIN
M4Multipage sites & navigation (college fest microsite)30 MIN
M5BUILD SPRINT 1 — chai-point/ site + git & push35 MIN
M6Tables (bus timetable)20 MIN
M7Forms — every input, labels, validation (blood-donation registration)50 MIN
M8Semantic HTML5 (news-article rebuild)30 MIN
M9BUILD SPRINT 2 — hostel-mess-feedback/ form page25 MIN
M10CSS — role, selectors, styling (music-playlist page)40 MIN
M11The box model (student ID card)35 MIN
M12Media queries & responsive design (movie-ticket page)30 MIN
M13BUILD SPRINT 3 — study-cafe/ full stylesheet35 MIN
M14Rapid recap — every rule on one card10 MIN
M15Timed unit test — all 17 PYQs, exam conditions25 MIN
How this resource relates to the class pages

Everything here also exists at full classroom pace across Classes 1–12 and Labs 1–3, with more repetition and more practice time. This crash course is the same syllabus at revision speed — perfect for a self-paced deep dive or getting exam-ready in one sitting. Wherever a topic deserves a slower second pass, a chip points you to the exact class page.

START FROM ZERO — "WHAT EVEN IS A WEBSITE?" (OPTIONAL, 2 MIN)

A website is a set of files sitting on a computer that never sleeps (a server). When you type an address into a browser (Chrome, Firefox…), the browser fetches those files and draws them on your screen.

The files are mostly plain text written in two languages you'll master today: HTML (what the page contains) and CSS (what the page looks like). No installs, no frameworks — a text editor and a browser are the entire toolkit for Unit 1.

BEFORE YOU START · DOWNLOAD THE CRASH U1 ASSET PACK

Three chunks in this resource use real image files — the city-guide photo (charminar.png, M3), the fest logo (fest-logo.png, M4) and the café logo used in the final sprint's background-image pass (poshtik-campus-logo.jpg, M13). One ZIP carries all three plus a WHERE-THESE-GO.txt telling you exactly which practice folder each file belongs in. Everything else in this unit is typed from scratch — that's the point of the sprints.

Checkpoint 1 · 36 — Orientation done

You know the shape of the unit and how the course map tracks you. Tick it and move on.

02

Chunk 2 · Concept map · ≈5 min

One picture of the whole unit

Unit 1 is two stacked layers: an HTML layer (what the page contains) feeding a CSS layer (what it looks like), with git running underneath as your safety net. Every chunk ahead lives somewhere on this map.

UNIT 1 · CONCEPT MAP — HTML LAYER FEEDS THE CSS LAYER
HTML LAYER — STRUCTURE (M2–M9) Web basicsclients · HTTP · servers HTML skeletonhtml · head · body Text · links · imagesh1–h6 · p · a · img · lists Tablestr · th · td · span Formsinputs · labels · submit Semantic HTML5header · nav · section… structure first — then, and only then, style it CSS LAYER — PRESENTATION (M10–M13) Selectorselement · .class · #id … Colours & fontscolor · font-family · role of CSS Box modelcontent · padding · border · margin Media queries@media · breakpoints · print Full stylesheetone responsive site — exam-ready GIT — RUNS UNDER EVERYTHING init → add → commit after every working state → push (practised in all three BUILD SPRINTS: M5 · M9 · M13)
Checkpoint 2 · 36 — Map in your head

Say the two layers out loud: HTML = structure, CSS = presentation, git = safety net. That order never changes.

03
M2 · HOW THE WEB WORKS · SCENARIO: OPENING YOUR AMAZON CART

Chunk 3 · Clients, servers & HTTP · ≈15 min

What actually happens when your Amazon cart appears

You open the browser, tap the cart icon on amazon.in, and the cart page appears in under a second. That one everyday moment contains the entire theory of this module: a client asked, a server answered, and HTTP was the language they spoke.

START FROM ZERO — "INTERNET vs WEB, AREN'T THEY THE SAME?" (2 MIN)

The Internet is the physical network — cables, routers, Wi-Fi radios — that lets computers exchange data at all. The Web is one service that runs on top of the Internet: documents (web pages) linked to each other, fetched with HTTP. Email and video calls also ride the Internet, but they are not the Web.

How we got here — the syllabus's opening line, in four stops

"Evolution of the Internet and World Wide Web" is the very first phrase of Unit I — and it makes a tidy 2-mark answer. Four dates carry the whole story:

1969 → TODAY — FOUR STOPS, ONE ARC
1969 ARPANET first message sent — and it crashed 1983 TCP/IP switches on one shared rulebook — the INTERNET properly begins 1989–91 Tim Berners-Lee, CERN invents the WEB: write (HTML) · address (URL) · fetch (HTTP) TODAY 5+ billion users same three inventions, barely changed in spirit

Hold the punchline: the internet is the roads (1969–83); the Web is one service driving on them (1989–91) — and the Web's three inventions (HTML to write pages, URLs to address them, HTTP to fetch them) are literally the table of contents of this crash course. If a 2-mark "trace the evolution of the Internet/WWW" appears, these four stops with their dates are the full answer.

ONE REQUEST · ONE RESPONSE — THE AMAZON CART MOMENT
CLIENT your laptop's browser asks for pages www.amazon.in SERVER Amazon's machine, always on stores & serves the pages view.html lives here HTTP REQUEST → "GET /gp/cart/view.html" HTTP RESPONSE ← "200 OK" + the HTML every page you have ever seen arrived exactly this way ✓

The request, line by line

HTTP is plain text. Here is (a trimmed version of) what your browser really sends when you open your Amazon cart — read it once and requests stop being magic.

what the browser sends → the requestone line per step
1GET /gp/cart/view.html HTTP/1.1
2Host: www.amazon.in
3User-Agent: Mozilla/5.0 (your browser's name)
·line 1 = the verb (GET = "give me"), the path, the HTTP version — the other lines are extra details called headers
0 / 0
what the server answers → the responseone line per step
1HTTP/1.1 200 OK
2Content-Type: text/html
3Content-Length: 1284
4(blank line, then the page itself:)
5<!DOCTYPE html> … the cart page HTML …
·200 OK = "found it, here it is". You have met its famous cousin: 404 Not Found = "no such page here"
0 / 0
See this happen for real — right now, in your own browser (60 seconds)

These request/response messages are not theory — your browser will show you the live ones. Do this once and the whole chunk becomes permanent memory:

  1. Open any site (say www.amazon.in) and press F12 — or right-click → Inspect — to open DevTools.
  2. Click the Network tab, then reload the page with Ctrl+R.
  3. A list of requests floods in — click the top one (that row IS the page itself).
  4. In the Headers panel, spot the REAL versions of both panels above: Request Method: GET, Host:, User-Agent: — and below them Status Code: 200 OK, Content-Type: text/html.
  5. Now visit a wrong address like amazon.in/nosuchpage9 — the 404 appears in the same panel. The "famous cousin", live.

Works in Chrome, Edge and Firefox — nothing to install. Every exam answer in this chunk is now something you have seen with your own eyes.

PREVIOUS-YEAR QUESTION · P4·Q1 2 MARKSASKED VERBATIM

2 marks = 2 solid points!Q1. What is HTTP? Why is it needed? [2M]

Model answer — write both points:

1
HTTP (HyperText Transfer Protocol) is the set of rules that a client (browser) and a web server follow to exchange web pages — the client sends a request, the server sends back a response.
2
It is needed because the two machines are different computers made by different people — without one agreed common language (verbs like GET, status codes like 200 OK), they could never understand each other. ✓ 2/2
Exam craft (beyond the 2 marks): expand the abbreviation HyperText Transfer Protocol in your first line — examiners scan for it. If the question grows to 4M, add: HTTP is stateless (each request stands alone, the server remembers nothing between them) and quote one request line (GET /gp/cart/view.html HTTP/1.1) plus one response line (200 OK) — both are in the two terminal panels above, which are your sample output for this answer.
0 / 0
10-SECOND SELF-CHECK

The Amazon cart page took a second to load. During that second, which machine was doing the asking?

Clients ask, servers answer — always. The router only carries the messages; it never speaks HTTP itself.

Checkpoint 3 · 36 — HTTP demystified

You can define HTTP, name who asks and who answers, and read a request line. That's the 2-mark question banked.

04

Chunk 4 · Web servers & the URL · ≈15 min

The machine that never sleeps — and the address that finds it

Amazon's server answered you at 2 a.m. during exam week and at 9 a.m. on a Monday. That is the defining property of a web server: software on an always-on machine whose only job is answering HTTP requests. To reach it, you used a URL — an address with fixed, nameable parts.

URL ANATOMY — AMAZON'S REAL CART ADDRESS, DISSECTED
https://www.amazon.in/gp/cart/view.html SCHEMEhttps = HTTP + encryption DOMAINwhich server machine on Earth PATHwhich folder on that server FILEwhich page in that folder read any URL right-to-left in your head: file ← folder ← machine ← protocol
What a web server IS

Software (Apache, Nginx…) running on an always-on computer. It listens for HTTP requests, finds the requested file on its disk, and returns it with a status code. One server can host many sites; a busy site can spread across many servers.

What a web server is NOT

It is not the browser (that's the client), not the Internet (that's the road between them), and not your own laptop while you build — though your machine plays server later when you open your files locally. Exams love these confusions; you now don't have them.

PREVIOUS-YEAR QUESTION · P1·Q2 & P2·Q1 (SAME TOPIC, TWICE!) 2+2 MARKS

asked in TWO papers — bank it!Q2. What is a web server? Mention its role with an example. [2M]

Model answer — definition + role + example:

1
A web server is software on an always-on computer that stores web pages and answers HTTP requests from clients (browsers).
2
Role: it receives the request, locates the file named in the URL path, and returns it with a status code (200 OK if found, 404 if not).
3
Example: when a shopper opens www.amazon.in/gp/cart/view.html, Amazon's server finds view.html in its gp/cart folder and sends it back. ✓ full marks
Exam craft (beyond the 2 marks): name one real server software (Apache or Nginx) — it upgrades "a computer" into a precise answer. Two traps the examiner watches for: the web server is software, not the hardware box; and it is not the browser — clients ask, servers answer, never the reverse. One always-on machine can host many sites at once.
0 / 0
10-SECOND SELF-CHECK

In https://www.amazon.in/gp/cart/view.html — which part names the machine?

The domain names the server machine; the scheme picks the protocol; path and file locate the page inside that machine.

WANT THE SLOWER SECOND PASS?

This module compresses the material covered at classroom pace in class-01.html and class-02.html — head there any time for the full-length treatment with more repetition and in-class activities.

Checkpoint 4 · 36 — M2 complete

Client vs server vs HTTP vs URL — all four defined, both M2 exam questions banked. Next: writing your first HTML.

05
M3 · HTML FOUNDATIONS · SCENARIO: "HYDERABAD WEEKEND" CITY GUIDE

Chunk 5 · The skeleton · ≈15 min

Every page ever made starts with these ten lines

New scenario for this module: you're building "Hyderabad Weekend" — a one-page guide to the city's best two days. Before any content, every HTML file needs the same skeleton. Learn it once here; you will type it from muscle memory by M5.

START FROM ZERO — "WHAT IS A TAG?" (2 MIN)

HTML marks meaning with tags: labels in angle brackets. Most come in pairs — <h1> opens, </h1> (note the slash) closes, and everything between is the element's content. The browser never shows the tags; it shows what they mean.

Some elements carry attributes — extra settings inside the opening tag, like lang="en". Attribute = name, equals sign, value in quotes.

Which tool do I type this in? (30-second answer)

Any plain-text editor works, but use VS Code (free, code.visualstudio.com) — it colours your tags, auto-closes them, and typing ! then Tab generates this entire skeleton instantly (the "Emmet" shortcut). Workflow: create a file ending in .html → type the code → save → double-click the file to open it in Chrome/Edge → edit, save, and press Ctrl+R in the browser to see changes. Notepad works in a pinch; full VS Code installation and setup is covered step-by-step in the regular classes — for this crash course, any editor you already have is enough. Remember the goal here: maximum marks in minimum time — the exam asks you to WRITE the code on paper, so the editor is just your practice ground.

The full skeleton, one line at a time

hyd-weekend.html — the skeletonstep through every line
1<!DOCTYPE html>
·line 1 tells the browser "this is modern HTML5" — always the first line, never anything above it
2<html lang="en">
·the root element wraps EVERYTHING; lang="en" tells screen readers and search engines the language
3 <head>
4 <meta charset="UTF-8">
·head = information ABOUT the page, invisible on screen; charset UTF-8 makes ₹, é and emoji render correctly
5 <title>Hyderabad Weekend</title>
·title shows on the browser TAB, not in the page — the most-forgotten line in exams
6 </head>
7 <body>
8 <h1>Hyderabad Weekend</h1>
·body = everything the visitor actually SEES; our first visible element is the main heading
9 </body>
10</html>
0 / 0
Hyderabad Weekend
file:///C:/Users/you/Documents/hyd-weekend/hyd-weekend.html

Hyderabad Weekend

Ten lines of skeleton → one visible heading. The tab shows the title; the page shows the h1. Two different things!
THE SAVE-AS RITUAL — SAME EVERY TIME
FOLDERmake hyd-weekend/ somewhere you can find again
FILE NAMEhyd-weekend.html — lowercase, no spaces, .html extension
OPEN ITdouble-click the file → it opens in your browser. Edit → save → refresh (F5) — that loop is web development.
10-SECOND SELF-CHECK

Your friend's page shows the heading fine, but the browser tab reads "Untitled". Which element did they forget?

The tab text comes from <title> inside <head>. The h1 is page content; DOCTYPE only declares the HTML version.

Checkpoint 5 · 36 — Skeleton memorised

Close your eyes and recite: DOCTYPE, html, head (meta + title), body. If you can, tick and continue.

06

Chunk 6 · Text & lists · ≈13 min

Filling the guide: headings, paragraphs, lists

A city guide is headings ("Day 1 — Old City"), paragraphs (what to expect), and lists (what to eat, in what order). Those three element families carry ninety percent of the text on the entire web.

Micro-example ladder — three steps up

1 · Headings rank content

<h1> to <h6> — importance, not size. One <h1> per page ("Hyderabad Weekend"), <h2> for days, <h3> for stops within a day. Never skip levels to "look smaller" — that's CSS's job later.

2 · Two kinds of list

<ul> = unordered (bullets — foods to try, any order). <ol> = ordered (numbers — the route walks stop 1 → 2 → 3). Both hold only <li> children.

3 · Inline emphasis

Inside a paragraph: <strong> = important (browsers bold it), <em> = stressed (browsers italicise it), <br> = a forced line break — one of the few tags with no closing pair.

The full reveal — Day 1 of the guide

hyd-weekend.html — inside <body>step through every line
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <title>Hyderabad Weekend</title>
6</head>  (the skeleton from Chunk 5)
7<body>
8<h1>Hyderabad Weekend</h1>
9<p>Two days. One city. <strong>Come hungry.</strong></p>
10<h2>Day 1 — Old City</h2>
·h2 under h1: a section inside the page — the heading ladder never skips a rung
11<p>Start early. The <em>real</em> Charminar crowd arrives by ten.</p>
12<h3>The route, in order</h3>
13<ol>
14 <li>Charminar at sunrise</li>
15 <li>Laad Bazaar bangle lane</li>
16 <li>Chowmahalla Palace</li>
17</ol>
·ol because the ORDER matters — it's a walking route. The food list next is ul: eat in any order you like
18<h3>Eat at least two</h3>
19<ul>
20 <li>Irani chai and Osmania biscuits</li>
21 <li>Haleem (seasonal!)</li>
22 <li>Double ka meetha</li>
23</ul>
·</body>
·</html>
0 / 0
Hyderabad Weekend
file:///C:/Users/you/Documents/hyd-weekend/hyd-weekend.html

Hyderabad Weekend

Two days. One city. Come hungry.

Day 1 — Old City

Start early. The real Charminar crowd arrives by ten.

The route, in order

  1. Charminar at sunrise
  2. Laad Bazaar bangle lane
  3. Chowmahalla Palace

Eat at least two

  • Irani chai and Osmania biscuits
  • Haleem (seasonal!)
  • Double ka meetha
Ordered route = numbers. Any-order food = bullets. The browser chose the markers; you chose the meaning.
10-SECOND SELF-CHECK

"Top 5 biryanis, ranked best to worst." Which list element?

"Ranked" means position carries meaning → ordered list. Ask "does shuffling it break it?" — if yes, <ol>.

Checkpoint 6 · 36 — Text mastered

Headings rank, paragraphs flow, ol vs ul is a meaning decision. On to the tags that made the web the web.

07

Chunk 7 · Links & images · ≈12 min

The two tags that made it a web

Pages became a web the day one page could point at another. <a> makes the pointer; <img> pulls a picture into the flow. Each has one attribute it cannot live without.

<a> needs href

<a href="day2.html">Day 2 plan</a> — the text between the tags is what you click; href is where you go. Full URLs reach other sites; bare filenames reach files sitting next to this one (a relative link — the workhorse of multipage sites, coming in M4).

<img> needs src — and deserves alt

<img src="charminar.png" alt="Charminar at sunrise"> — no closing tag. src names the picture file; alt is the text spoken by screen readers and shown if the image fails. Exams award marks for alt; so do real users. (The photo itself is in today's asset pack — Chunk 1's download button.)

Full reveal — the guide gets a photo and a booking link

hyd-weekend.html — closing the pagestep through every line
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <title>Hyderabad Weekend</title>
6</head>  (skeleton — Chunk 5)
7<body>
8<h1>Hyderabad Weekend</h1>
·… lines 9–22: the paragraphs, h2/h3 headings and the two lists typed in Chunk 6 … (already in your file — unchanged)
23</ul>
24<h2>The postcard shot</h2>
25<img src="charminar.png" alt="Charminar at sunrise" width="420">
·src = which file (sitting in the same folder), alt = what it shows in words, width = display size in pixels
26<p>Trains fill up fast — <a href="https://www.irctc.co.in">book on IRCTC</a>.</p>
·a full https:// URL leaves your site; only the words "book on IRCTC" are clickable
27<p><a href="day2.html">Continue to Day 2 →</a></p>
·a relative link — no https://, no domain — points at day2.html in the SAME folder. That file doesn't exist yet… M4 fixes that
28</body>
29</html>
0 / 0
Hyderabad Weekend
file:///C:/Users/you/Documents/hyd-weekend/hyd-weekend.html

The postcard shot

Charminar at sunrise — the real photo the snippet loads

Trains fill up fast — book on IRCTC.

Continue to Day 2 →

Blue + underline = the browser's default link costume. Clicking "Day 2" right now would show an error — the file isn't written yet.
The classic broken-image mistake

If the photo shows as a broken icon, check three things in order: is charminar.png really in the same folder as the HTML file? Is the filename spelled exactly the same, including case and extension (.png, not .jpg)? Did you write src= (not href= — that's for links)? Ninety percent of broken images are one of these three.

10-SECOND SELF-CHECK

Which attribute pair is correct?

Links reference (href = hypertext reference); images name their source file (src). Swapping them is the most common exam trap.

WANT THE SLOWER SECOND PASS?

Classroom-pace coverage of this module lives in class-03.html and class-04.html, with extra in-class activities and more practice reps.

Checkpoint 7 · 36 — M3 complete

Skeleton, text, lists, links, images — you can now write a complete single page from a blank file. M4 turns one page into a site.

08
M4 · MULTIPAGE SITES · SCENARIO: COLLEGE FEST MICROSITE

Chunk 8 · Relative paths · ≈10 min

One page is a poster. Three pages are a site.

New scenario: the college fest committee needs a microsite — home, events, register. The moment you have more than one file, everything depends on one skill: describing where a file lives relative to the file that's asking.

START FROM ZERO — "WHAT'S A FOLDER PATH?" (2 MIN)

Your computer stores files in folders, folders in folders. A path is the written route to a file: fest/img/logo.png means "inside fest, inside img, the file logo.png". A relative path starts from wherever the current file already is — no drive letters, no domain.

fest/ — THE WHOLE SITE, ONE FOLDER
fest/
index.html ← the home page — servers open this name by default
events.html
register.html
img/
fest-logo.png ← in the asset pack — drop it into img/ when you build this
FROM index.html, YOU WANT…WRITEWHY
the events pagehref="events.html"same folder — just the name
the logo imagesrc="img/fest-logo.png"go into img/ first
back to home from events.htmlhref="index.html"they're neighbours — same folder
another websitehref="https://…"full URL = leave the site
10-SECOND SELF-CHECK

From events.html, the logo lives in img/. What goes in src?

Relative paths start from the asking file's own folder. events.html already lives inside fest/ — naming fest/ again would look for fest/fest/img/…

Checkpoint 8 · 36 — Paths click

Same folder = bare name; subfolder = folder/name; other site = full URL. That's the entire theory.

09

Chunk 9 · Wiring the pages · ≈12 min

Three files, six links, one site

Every page carries the same tiny nav — links to the other two pages. Step through the code, then actually click around the preview: it's a real working microsite.

fest/index.html — nav + body (the other two pages repeat the pattern)step through
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <title>VIBRANZA '26</title>
6</head>  (the usual skeleton)
7 <body>
8 <p><a href="events.html">Events</a> | <a href="register.html">Register</a></p>
·the nav row — every page of the site carries this same line so a visitor is never stranded
9 <img src="img/fest-logo.png" alt="College Fest logo" width="180">
·the Chunk-8 path table, cashed in: the logo lives one folder DOWN, so the src steps INTO img/ first. The file itself is in the asset pack
10 <h1>VIBRANZA '26</h1>
11 <p>Two days of music, code and food. March 6–7.</p>
12 </body>
13</html>
·events.html and register.html reuse the same skeleton + nav, swapping only the h1 and the content below it
0 / 0
VIBRANZA '26
file:///C:/Users/you/Documents/fest/index.html

Events | Register

College Fest logo — loaded from img/fest-logo.png

VIBRANZA '26

Two days of music, code and food. March 6–7.

Home | Register

Events

  • Battle of Bands — main stage, 6 pm
  • 24-hour hackathon — CS block
  • Food street — parking lot P2

Home | Events

Register

Registration opens with the form module (M7) — for now this page just exists, and that's enough to link to it.

This preview is REAL — click the blue links. Watch the tab title and the address bar change with every hop: three files, one site.
Why the home page is called index.html

When a browser asks a server for a folder ("give me fest/"), the server hands back the file named index.html by convention — no filename needed in the address. Name your home page anything else and visitors to your site's root see an error. It's the one filename on the web you don't get to choose.

Checkpoint 9 · 36 — M4 complete

You can plan a folder, wire pages with relative links and explain index.html. Time to prove it — build sprint next.

10
M5 · BUILD SPRINT 1 — TYPE, DON'T READ

Chunk 10 · Sprint: a real site from zero · ≈15 min

Build chai-point/ — every M2–M4 skill, one artefact

Your friend runs a tea stall and wants a site: a home page, a menu, a "find us". You have every skill this needs. Close the reveals, open your editor, type. The solution is gated below — earn it first.

The brief. Build the complete site in a fresh chai-point/ folder:

  1. index.html — proper skeleton, title "Chai Point", h1, one welcoming paragraph with a strong word, nav links to both other pages.
  2. menu.html — same skeleton + nav; an h2 "Today's menu"; an unordered list of 4 drinks; an ordered list "How we brew" with 3 steps.
  3. find-us.html — same skeleton + nav; an address paragraph; one full-URL link to Google Maps.
  4. Every page's nav must reach the other two pages; test every link in the browser before you peek below.

Built and clicked through all three pages? Then compare, don't copy.

chai-point/menu.html — reference (the trickiest of the three)step through
1<!DOCTYPE html>
2<html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <title>Menu — Chai Point</title>
6 </head>
7 <body>
8 <p><a href="index.html">Home</a> | <a href="find-us.html">Find us</a></p>
9 <h1>Chai Point</h1>
10 <h2>Today's menu</h2>
11 <ul>
12 <li>Masala chai — ₹15</li>
13 <li>Ginger chai — ₹15</li>
14 <li>Lemon tea — ₹12</li>
15 <li>Filter coffee — ₹20</li>
16 </ul>
17 <h2>How we brew</h2>
18 <ol>
19 <li>Boil milk with crushed ginger</li>
20 <li>Add tea dust, simmer two minutes</li>
21 <li>Strain high, serve hot</li>
22 </ol>
23 </body>
24</html>
0 / 0
Menu — Chai Point
file:///C:/Users/you/Documents/chai-point/menu.html

Home | Find us

Chai Point

Today's menu

  • Masala chai — ₹15
  • Ginger chai — ₹15
  • Lemon tea — ₹12
  • Filter coffee — ₹20

How we brew

  1. Boil milk with crushed ginger
  2. Add tea dust, simmer two minutes
  3. Strain high, serve hot
Menu = ul (any order). Brewing = ol (order matters). If your version made different calls with good reasons, that's fine.
Checkpoint 10 · 36 — Site built

Three pages, all links tested. Don't lose this folder — the next chunk puts it under version control.

11
M5 · GIT — THE SAFETY NET UNDER EVERYTHING

Chunk 11 · git init → add → commit → push · ≈20 min

Give chai-point/ a memory

Right now one bad save could destroy your site. git fixes that: it takes named snapshots (commits) of the whole folder, forever rewindable — and push copies them to GitHub so even a dead laptop can't take them.

START FROM ZERO — "NEVER USED A TERMINAL?" (3 MIN)

The terminal is a text box where you type commands instead of clicking. On Windows open Git Bash (installed with git), on Mac open Terminal. Two commands cover navigation: cd foldername steps into a folder, ls lists what's here. The $ at line start is the prompt — the computer saying "your turn". You never type the $.

terminal — inside chai-point/one command per step
1$ cd chai-point
·step INTO the site folder first — git commands act on wherever you're standing
2$ git init
3Initialized empty Git repository in …/chai-point/.git/
·done ONCE per project — git now watches this folder via a hidden .git/ subfolder
4$ git add .
·"stage everything" — the dot means all changed files. Staging = putting files in the photo frame
5$ git commit -m "Chai Point site: home, menu, find-us"
6[main (root-commit) 3f1a9c2] Chai Point site: home, menu, find-us
·the snapshot. The -m message says WHAT this save point contains — future-you reads these like a diary
7$ git remote add origin https://github.com/YOU/chai-point.git
·connect the folder to an empty repository you created on github.com (done once)
8$ git push -u origin main
9To https://github.com/YOU/chai-point.git * [new branch] main -> main
·your commits now live in the cloud too. From tomorrow the loop is just: edit → add → commit → push
0 / 0
THE DAILY GIT LOOP — MEMORISE THIS SHAPE
ONCE EVERgit init · git remote add origin …
EVERY WORKING STATEgit add .git commit -m "what changed"
END OF SESSIONgit push
GOLDEN RULEcommit when it works, not when it's perfect — small commits, honest messages.
Sprint habit from here on: every build sprint in this course ends with add → commit → push
10-SECOND SELF-CHECK

You fixed a broken link and the site works again. What's the correct next move?

Working state = save point, immediately. init is once per project ever; and "perfect" never arrives — commits are cheap, losses aren't.

WANT THE SLOWER SECOND PASS?

The regular track's fswd_lab_01.html runs this whole build-and-git journey at classroom pace with more practice reps and troubleshooting help.

Checkpoint 11 · 36 — M5 complete · Sprint 1 shipped

A real site, built and version-controlled by you. One third of the unit done — tables are next, and they're quick.

12
M6 · TABLES · SCENARIO: CAMPUS SHUTTLE TIMETABLE

Chunk 12 · Tables · ≈20 min

Data that lives in rows and columns

The campus shuttle timetable is a grid: routes down, timings across. HTML tables are built row by row — you never declare columns; the columns emerge from cells lining up.

The four-tag family

<table> wraps it all · <tr> = one row · <th> = a header cell (bold + centred by default) · <td> = a data cell. Nothing else is required.

Think row-major

Write the first row completely, then the next. A 3-column table is simply every <tr> containing exactly 3 cells. Miscount one row and the grid visibly staggers — instant feedback.

Full reveal — the shuttle timetable

shuttle.html — inside <body>step through
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <title>Campus Shuttle</title>
6</head>
7<body>
8<h1>Campus Shuttle — Morning Runs</h1>
9<table border="1">
·border="1" draws visible grid lines — the quick classroom way; CSS takes this job over in M10
10 <tr>
11 <th>Route</th> <th>First bus</th> <th>Every</th>
·row 1 is all th — the header row. Three header cells = this table has three columns, decided right here
12 </tr>
13 <tr>
14 <td>Hostel → Main block</td> <td>7:40 am</td> <td>20 min</td>
15 </tr>
16 <tr>
17 <td>Metro gate → CS block</td> <td>8:00 am</td> <td>15 min</td>
18 </tr>
19</table>
20</body>
21</html>
0 / 0
Campus Shuttle
file:///C:/Users/you/Documents/shuttle/shuttle.html

Campus Shuttle — Morning Runs

RouteFirst busEvery
Hostel → Main block7:40 am20 min
Metro gate → CS block8:00 am15 min
th cells came out bold and centred without any styling — that's their built-in meaning: "I'm a header".
colspan — reach RIGHT

<th colspan="2"> makes ONE cell claim two column slots in its own row. That row then types one cell fewer — the span already paid for the missing one.

rowspan — reach DOWN

<td rowspan="2"> makes one cell claim its own slot plus the same slot in the row below. That next row must NOT type the cell — the reaching cell already owns it.

Full reveal — merging cells in the timetable

shuttle-merged.html — the full filestep through
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <title>Shuttle — merged cells</title>
6</head>
7<body>
8<table border="1">
9 <tr>
10 <th colspan="2">Morning Shuttle</th>
·colspan="2" — this ONE cell claims BOTH column slots, so its row types only ONE cell
11 </tr>
12 <tr>
13 <td rowspan="2">Hostel gate</td>
·rowspan="2" — claims this row's slot AND the same slot in the row below
14 <td>7:40 am</td>
15 </tr>
16 <tr>
17 <td>8:00 am</td>
·NO first cell typed here — Hostel gate still owns that slot from the row above
18 </tr>
19</table>
20</body>
21</html>
0 / 0
Shuttle — merged cells
file:///C:/Users/you/Documents/shuttle/shuttle-merged.html
Morning Shuttle
Hostel gate7:40 am
8:00 am
The row arithmetic: typed cells per row = 1, 2, 1 · visible slots per row = 2, 2, 2. The difference is exactly what the spans claimed — typed cells + claimed slots = column count. That arithmetic is the whole skill.
PREDICT THE RENDER

Row 1 of a 2-column table is <tr><th colspan="2">Fares</th></tr>. How many cells must row 2 type?

colspan widens a cell sideways in that row alone; the next row starts fresh and types both cells. Only rowspan reaches DOWN into later rows — and then the invaded row types one fewer.

PREVIOUS-YEAR QUESTION · P1·Q1 2 MARKS

old-style attributes — still asked!Q1. How do you set the background colour and text colour of a table row in HTML? Give an example. [2M]

Model answer — name the attributes + show one row:

1
The legacy HTML attributes are bgcolor (background) and — for text — wrapping the content in a <font color=…> tag; both sit directly on the row/cell:
2
EXAMPLE — ONE HIGHLIGHTED ROWONE LINE PER PRESS
1<tr bgcolor="yellow">
2 <td><font color="red">Hostel route</font></td>
3</tr>
3
Bonus line for full credit: these attributes are obsolete in HTML5 — the modern way is CSS: background-color and color (coming in M10). ✓ 2/2
0 / 0
MODEL PROGRAM — THE ANSWER, TYPED AND RUN
pyq-table-row.html · the answer as a full working tablestep through
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <title>PYQ — table row</title>
6</head>
7<body>
8<table border="1">
9 <tr><th>Route</th><th>Departure</th></tr>
10 <tr bgcolor="yellow"> <!-- the exam's row -->
11 <td><font color="red">Hostel route</font></td><td>7:30 AM</td>
12 </tr>
13 <tr><td>Library loop</td><td>8:00 AM</td></tr>
14</table>
15</body>
16</html>
0 / 0
file:///C:/Users/you/Documents/pyq-practice/pyq-table-row.html
RouteDeparture
Hostel route7:30 AM
Library loop8:00 AM
Exactly what the examiner pictures: one yellow row, red text in one cell, other rows untouched — bgcolor on the tr paints the whole row, font color paints only its own cell's text.
10-SECOND SELF-CHECK

A table renders with its second row shifted one cell left. Most likely cause?

Columns are made by cells lining up — a missing cell drags everything after it leftward. Count the cells in each tr.

Checkpoint 12 · 36 — M6 complete

table / tr / th / td, row-major thinking, colspan/rowspan merges with the row arithmetic, and the bgcolor PYQ banked with its modern-CSS bonus line. Forms next — the unit's biggest module.

13
M7 · FORMS · SCENARIO: BLOOD-DONATION CAMP REGISTRATION

Chunk 13 · The form & text inputs · ≈17 min

The page finally talks back

The NSS unit is running a blood-donation camp and needs donors registered: name, phone, email, date of birth. Until now visitors could only read your pages. A form lets them type into your page — and every control follows one repeating pattern.

The wrapper: <form>

All controls live inside <form>. Its action attribute names where the data goes on submit — a server URL in real life. Ours stays action="#" ("this page") until the server units.

The pattern: label + input

Every control is a pair: <label for="phone"> names it for humans, <input id="phone"> collects the value. The matching for/id means clicking the words focuses the box — and screen readers announce it. Marks AND usability.

The name attribute

name="phone" is the label the data travels under when submitted — no name, no data. Rule of thumb: every input gets id (for its label) and name (for its data).

Full reveal — the text-family half of the form

donate.html — inside <body>step through
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <title>Donate Blood</title>
6</head>
7<body>
8<h1>Blood Donation Camp — Register</h1>
9<form action="#" method="post">
·method="post" sends data privately in the request body (get would expose it in the URL — wrong for personal data)
10 <p><label for="dname">Full name:</label>
11 <input type="text" id="dname" name="dname" required></p>
·type="text" = one free-typed line. required = the browser refuses to submit while it's empty — validation with zero code
12 <p><label for="dphone">Phone:</label>
13 <input type="tel" id="dphone" name="dphone"></p>
·type="tel" — on a phone this pops the NUMBER keypad instead of the letter keyboard. Same box on desktop; better manners on mobile
14 <p><label for="demail">Email:</label>
15 <input type="email" id="demail" name="demail"></p>
·type="email" auto-checks the shape (needs an @) before allowing submit — try it in the live preview
16 <p><label for="ddob">Date of birth:</label>
17 <input type="date" id="ddob" name="ddob"></p>
·type="date" gives a whole calendar picker free of charge. The form continues in the next chunk…
·… lines 18–28: the choice controls + submit (Chunks 14–15) … (typed in the coming chunks)
28 </form>
29</body>
30</html>
0 / 0
LIVE OUTPUT — THESE CONTROLS REALLY WORK, TRY THEM
file:///C:/Users/you/Documents/donate/donate.html

Blood Donation Camp — Register

Click the words "Full name:" — the box focuses. That's the for/id pairing working. The date field opens a real calendar.
10-SECOND SELF-CHECK

An input has an id but no name. What breaks?

id serves the label; name labels the submitted data. No name → the server never receives that field, and nothing warns you. Classic silent bug.

Checkpoint 13 · 36 — Text inputs done

form / label / input, the id-vs-name split, and four text-family types. Choice controls next.

14

Chunk 14 · Choice controls · ≈17 min

Pick one, pick many, pick from a list

Blood group: exactly one of eight — radio buttons. "I've donated before / I'm on medication": tick any that apply — checkboxes. Camp slot from a long list — select. Three controls, three decision shapes.

donate.html — the form, continuedstep through
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <title>Donate Blood</title>
6</head>
7<body>
8 <form action="#" method="post">
·… lines 9–17: the four text-family inputs typed in Chunk 13 … (already in your file — unchanged)
18 <p>Blood group:
19 <input type="radio" id="bg-op" name="bgroup" value="O+"><label for="bg-op">O+</label>
20 <input type="radio" id="bg-ap" name="bgroup" value="A+"><label for="bg-ap">A+</label>
21 <input type="radio" id="bg-bp" name="bgroup" value="B+"><label for="bg-bp">B+</label></p>
·THE rule: all radios in one question share the SAME name ("bgroup") — the shared name is what makes them exclusive. Each has its own id and value
22 <p><input type="checkbox" id="prev" name="prev"><label for="prev">I have donated before</label></p>
·checkboxes are independent — each its own name, tick any combination
23 <p><label for="slot">Camp slot:</label>
24 <select id="slot" name="slot">
25 <option>9–11 am</option> <option>11–1 pm</option> <option>2–4 pm</option>
26 </select></p>
·select = a dropdown; each option is one row of it. Great when the list is long — eight blood groups as radios is fine, thirty districts is not
·… lines 27–28: textarea + submit come next (Chunk 15) …
28 </form>
29</body>
30</html>
0 / 0
LIVE OUTPUT — CLICK O+, THEN A+. ONLY ONE HOLDS.
file:///C:/Users/you/Documents/donate/donate.html
Blood group:
The radios exclude each other because they share a name. That single fact is a 2-mark exam question — right below.
PREVIOUS-YEAR QUESTION · P3·Q1 2 MARKSDEBUG QUESTION

you just learned the fix!Q1. A student's form lets users select BOTH "Male" and "Female" radio buttons at once. Identify the bug and write the corrected code. [2M]

Model answer — name the bug, show the fix:

1
Bug: the two radios have different name attributes (or none) — radios are only mutually exclusive when they share the same name, because the shared name defines the group.
2
CORRECTED — ONE SHARED name, DIFFERENT valueONE LINE PER PRESS
1<input type="radio" name="gender" value="male"> Male
2<input type="radio" name="gender" value="female"> Female
✓ 2/2
0 / 0
MODEL PROGRAM — BUG AND FIX, SIDE BY SIDE, LIVE
pyq-radio-fix.html · the buggy pair, then the corrected pairstep through
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <title>PYQ — radio fix</title>
6</head>
7<body>
8<!-- THE BUG — two different names = two separate groups -->
9<input type="radio" name="m"> Male <input type="radio" name="f"> Female
10<!-- THE FIX — one shared name = one exclusive group -->
11<input type="radio" name="gender" value="male"> Male <input type="radio" name="gender" value="female"> Female
12</body>
13</html>
0 / 0
LIVE OUTPUT — CLICK THE RADIOS, PROVE THE BUG
file:///C:/Users/you/Documents/pyq-practice/pyq-radio-fix.html

BUGGY — click both: BOTH stay selected ✗

  

FIXED — click both: only ONE holds ✓

  

These are real radio buttons — try them. The top pair proves the bug the question describes; the bottom pair proves the one-line fix.
Checkpoint 14 · 36 — Choice controls done

Radio = one of many (shared name!), checkbox = any, select = dropdown. The broken-radios PYQ is banked.

15

Chunk 15 · Finishing the form · ≈16 min

Long answers, the big button, and the exam's favourite list

Two controls finish the registration: <textarea> for the multi-line "any medical conditions?" answer, and the submit button that fires the whole form off. Then we bank the most-asked forms PYQ.

donate.html — the form's last linesstep through
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <title>Donate Blood</title>
6</head>
7<body>
8 <form action="#" method="post">
·… lines 9–26: every control from Chunks 13–14 (text inputs, radios, checkbox, select) … (already in your file — unchanged)
27 <p><label for="med">Any medical conditions?</label>
28 <textarea id="med" name="med" rows="3"></textarea></p>
·textarea has a CLOSING tag (unlike input) — anything between the tags becomes pre-filled text. rows sets visible height
29 <p><button type="submit">Register as donor</button></p>
·the trigger: clicking it runs every required/email check, and only if ALL pass does the browser send the data to the form's action
30</form>
31</body>
32</html>
0 / 0
LIVE OUTPUT — TYPE A LONG ANSWER, DRAG THE CORNER
file:///C:/Users/you/Documents/donate/donate.html
A real textarea grows with your answer. The button here is disarmed — in your own file it submits the form.
PREVIOUS-YEAR QUESTION · P2·Q2 2 MARKS

a list question — rattle them offQ2. List any four input types in HTML5 forms and state the purpose of each. [2M]

Model answer — any four, one line each (you know seven):

1
text — one free-typed line (name); email — auto-validates the @-shape before submit.
2
tel — phone number, mobile shows the number keypad; date — calendar picker.
3
radio — choose exactly one of a same-name group; checkbox — independent yes/no; number — digits only with spinner arrows. Any four = full marks. ✓ 2/2
0 / 0
MODEL PROGRAM — THE FOUR TYPES, TYPED AND RUN
pyq-input-types.html · one labelled line per typestep through
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <title>PYQ — input types</title>
6</head>
7<body>
8<p><label>Name: <input type="text"></label></p>
9<p><label>Email: <input type="email"></label></p>
10<p><label>DOB: <input type="date"></label></p>
11<p><label>Age: <input type="number" min="16" max="60"></label></p>
12</body>
13</html>
0 / 0
LIVE OUTPUT — REAL CONTROLS, TRY EACH ONE
file:///C:/Users/you/Documents/pyq-practice/pyq-input-types.html
Each type earns its keep visibly: date pops a calendar, number grows spinner arrows, email refuses a value without an @ at submit time. Naming what each does is the second half of the marks.
10-SECOND SELF-CHECK

Which control needs a closing tag?

input is a void element — no closing tag ever. textarea closes because its content (the pre-filled text) lives between the tags.

WANT THE SLOWER SECOND PASS?

The regular track spreads forms across class-06.html and class-07.html with a full fieldset/legend treatment and more validation practice.

Checkpoint 15 · 36 — M7 complete

Every form control, the label pattern, both forms PYQs banked. Next: semantic HTML — including the div/span add-on.

16
M8 · SEMANTIC HTML5 · SCENARIO: CAMPUS NEWS ARTICLE

Chunk 16 · div & span · ≈10 min

The two tags that mean… nothing

New scenario: the college newsroom wants its top story on the web. Before the meaningful tags, meet the two deliberately meaningless ones — <div> and <span>. They exist to group things when no better tag fits, and knowing them makes the next chunk's upgrade make sense.

<div> — a block-level box

A plain container that starts on a new line and stretches full width. It says nothing about its contents — it's an empty cardboard box you group other elements into, usually so you can style or position them together later with CSS.

<span> — an inline sleeve

The same idea at word level: it wraps a few words inside a line without breaking the flow. Perfect for colouring one phrase or tagging one date — invisible until CSS gives it a job.

Block vs inline — the one distinction to hold onto

Block elements (div, h1, p, ul, table…) stack downward, each claiming its own row. Inline elements (span, a, strong, em…) sit inside a line of text like words do. div is the generic block; span is the generic inline. Every layout decision in M10–M12 builds on this pair of behaviours.

Micro-example — grouping with div, highlighting with span

news.html — first attempt, generic containers onlystep through
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <title>Campus News</title>
6</head>
7<body>
8 <div>
·a box around the whole story — starts a new line, spans full width, means nothing yet
9 <h1>Robotics team wins nationals</h1>
10 <p>Reported on <span>24 August 2026</span> from the tech fest.</p>
·the span wraps just the date INSIDE the sentence — no line break, no visible change… yet. CSS will find it by this handle in M10
11 <p>The team beat 42 colleges in the final round.</p>
12 </div>
0 / 0
Campus News
file:///C:/Users/you/Documents/news/news.html
THE DIV'S INVISIBLE BOX (dashed line added so you can see it)

Robotics team wins nationals

Reported on 24 August 2026 from the tech fest.

The team beat 42 colleges in the final round.

In a real browser both containers are invisible — the dashed lines here only show you where they sit. div boxed the story; span sleeved the date inside its sentence.
10-SECOND SELF-CHECK

You want to colour just the words "42 colleges" inside a paragraph. Which wrapper?

A div would break the sentence into three stacked rows — it's a block. span is the inline sleeve made exactly for this.

Checkpoint 16 · 36 — Generic containers done

div = generic block, span = generic inline. Now watch what happens when a page is built from NOTHING but divs…

17

Chunk 17 · The semantic rebuild · ≈12 min

Same page, but now every part says what it is

A page built only from divs works — but nothing on it is named. HTML5 added a family of tags that carry their meaning in the tag itself: header, nav, main, section, article, aside, footer. Watch the news page rebuild, one meaningful region per step.

TAGMEANSON THE NEWS PAGE
<header>introductory strip of a page (or section)paper name + tagline
<nav>a block of navigation linksHome · Sports · Tech
<main>THE main content — one per pageeverything below the nav
<article>self-contained piece that could stand alonethe robotics story
<section>a themed grouping of contentthe "more headlines" block
<aside>related but tangential content"about the team" side box
<footer>closing strip — credits, contact© Campus News 2026

Full reveal — the rebuild, region by region

news.html — semantic version, inside <body>one region per step
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <title>Campus News</title>
6</head>
7<body>
8 <header>
9 <h1>Campus News</h1>
10 </header>
·was <div> — now the tag ITSELF says "I introduce this page"
11 <nav><a href="index.html">Home</a> <a href="sports.html">Sports</a></nav>
·a screen reader can now announce "navigation" and jump straight past it — a div could never promise that
12 <main>
13 <article>
14 <h2>Robotics team wins nationals</h2>
15 <p>The team beat 42 colleges in the final round.</p>
16 </article>
·article = "this piece could be lifted out and still make sense" — exactly what a news story is
17 <aside><p>The team: 6 students, 2 years of building.</p></aside>
18 </main>
19 <footer><p>© Campus News 2026</p></footer>
20</body>
21</html>
0 / 0
Campus News
file:///C:/Users/you/Documents/news/news.html
HEADER

Campus News

NAV

Home Sports

MAIN → ARTICLE

Robotics team wins nationals

The team beat 42 colleges in the final round.

ASIDE

The team: 6 students, 2 years of building.

FOOTER

© Campus News 2026

The coloured bands are X-ray vision — in the real browser the page LOOKS identical to the div version. The meaning changed, not the pixels. That's the whole point (and the whole exam answer).

The HTML5 feature everyone forgets in the exam: native <video> & <audio>

Before HTML5, playing a video needed a plugin (Flash). HTML5 made video and audio first-class tags — the browser plays them natively. Examiners love this feature because it has visible attributes to name. Here it is inside a complete page skeleton, ready to copy:

html5-video.html · native multimedia, full skeletonstep through
1<!DOCTYPE html>
2<html>
3<head> <title>Campus News — video report</title> </head>
4<body>
5 <video controls width="480" playsinline>
6 <source src="report.mp4" type="video/mp4">
7 Your browser does not support video.
8 </video>
9 <audio controls src="interview.mp3"></audio>
10</body>
11</html>
·controls = show play/pause bar · width = size · playsinline = play in place on phones · the text inside is the fallback for old browsers
0 / 0
Why this matters for marks

"List new features of HTML5" appears again and again. The safest full-credit answer names FOUR families: (1) semantic tags (<header> <nav> <section> <article> <footer>), (2) native multimedia (<video> <audio> — no plugin needed), (3) new form input types (email, date, tel, number) with built-in validation, (4) <canvas> for drawing graphics with JavaScript. Two are asked — knowing four means you can always pick the two you remember best.

PREVIOUS-YEAR QUESTION · P4·Q2 2 MARKS

name features + know one tag wellQ2. List any two new features of HTML5. What is the purpose of the <section> tag? [2M]

Model answer — two features, then the tag:

1
Two new features: (i) semantic structural tags<header>, <nav>, <section>, <article>, <footer> — that name a page's regions; (ii) new form input types with built-in validation — email, date, tel, number. (Also accepted: native <audio>/<video>, <canvas>.)
2
<section>: groups a thematically related block of content, usually with its own heading — e.g. a "More headlines" block on a news page. Unlike <div> it carries meaning browsers, search engines and screen readers can use. ✓ 2/2
0 / 0
Checkpoint 17 · 36 — Rebuild done

Seven region tags, each placed on a real page, and the HTML5-features PYQ banked. One question left: WHY does this matter enough for 4 marks?

18

Chunk 18 · Why it matters · ≈8 min

Three readers, one page

Every page you publish is read by three very different audiences — and only one of them has eyes. Semantic tags are how the other two understand you.

1 · Humans with assistive tech

A screen-reader user can say "jump to main" or "skip navigation" — but only if <main> and <nav> exist. In a div-only page there is nothing to jump to; the page must be read top to bottom.

2 · Search engines

Google's crawler weighs what it finds in an <article> more heavily than sidebar or footer text. Semantic structure literally changes how your content ranks.

3 · Other developers (and future you)

Opening a file and seeing <footer> beats decoding <div class="bt-wrp2">. Teams onboard faster; bugs hide less.

PREVIOUS-YEAR QUESTION · P4·Q11a 4 MARKS

4 marks = 4 developed pointsQ11a. Explain the importance of semantic elements in HTML5 with suitable examples. [4M]

Model answer — definition, then three developed benefits:

1
Definition: semantic elements are tags whose name describes their content's role<header>, <nav>, <main>, <article>, <section>, <aside>, <footer> — unlike the generic <div>/<span> which carry no meaning.
2
Accessibility: screen readers announce regions and let users jump directly to <main> or skip <nav> — impossible when everything is a div. Example: a visually-impaired reader skips a 12-link nav in one keystroke.
3
SEO: search engines identify the primary content via <article>/<main> and rank it appropriately, instead of treating footer text and story text as equals.
4
Maintainability: code reads as its own documentation — <footer> needs no comment, <div class="bottom-wrapper-2"> needs archaeology. Teams build and debug faster. ✓ 4/4
0 / 0
MODEL PROGRAM — THE "SUITABLE EXAMPLE" THE QUESTION DEMANDS
pyq-semantic.html · the 7-tag skeleton to write in the examstep through
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <title>PYQ — semantic page</title>
6</head>
7<body>
8<header><h1>Campus News</h1></header>
9<nav>Home · Sports · Events</nav>
10<main>
11 <article><h2>Robotics team wins</h2><p>…story…</p></article>
12 <aside>Trending this week</aside>
13</main>
14<footer>© 2026 Campus News Club</footer>
15</body>
16</html>
0 / 0
file:///C:/Users/you/Documents/pyq-practice/pyq-semantic.html — region X-ray
<header> — Campus News
<nav> — Home · Sports · Events
<main>
<article> — Robotics team wins
<aside> — Trending this week
<footer> — © 2026 Campus News Club
Sketch this banded block diagram beside your answer — an examiner seeing the regions labelled header / nav / main / article / aside / footer ticks the "suitable example" requirement instantly.
10-SECOND SELF-CHECK

A semantic page and its div-only twin are opened side by side. What differs on screen?

Semantic tags don't change default rendering (main, section, article all render like divs). They change what machines and assistive tech can UNDERSTAND.

WANT THE SLOWER SECOND PASS?

The regular track's class-08.html runs this module at classroom pace, with the X-ray layout simulation and a full audit activity.

Checkpoint 18 · 36 — M8 complete

Half the unit done! div/span, seven semantic regions, both PYQs banked. Build Sprint 2 next — a complete form file, typed by you.

19
M9 · BUILD SPRINT 2 — TYPE, DON'T READ

Chunk 19 · Sprint: a complete form file · ≈13 min

Build hostel-mess-feedback/ — every M7–M8 skill, one file

The hostel warden wants the mess feedback on the web. One page, one form, every control family you own: text inputs, radios, checkboxes, a select, a textarea, a submit. Semantic regions wrap it. Close the reveals and type.

The brief. One file, feedback.html, in a fresh hostel-mess-feedback/ folder:

  1. Semantic shell: header (h1 "Mess Feedback — August"), main holding the form, footer ("Hostel Office · Block C").
  2. Text family: name (text, required) · room number (number) · email (email).
  3. Exactly-one choice: "Which mess?" — radios North / South sharing name="mess".
  4. Any-that-apply: checkboxes "veg counter", "juice counter" — each its own name.
  5. A select rating 1–5, a 3-row textarea for suggestions, and a submit button "Send feedback".
  6. Every input labelled with a matching for/id pair — click the words, the control must focus.

Clicked every label? Tried submitting with an empty name? Then compare, don't copy.

hostel-mess-feedback/feedback.html — reference (body only)step through
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <title>Mess Feedback</title>
6</head>
7<body>
8 <header><h1>Mess Feedback — August</h1></header>
9 <main>
10 <form action="#" method="post">
11 <p><label for="fname">Name:</label> <input type="text" id="fname" name="fname" required></p>
12 <p><label for="room">Room no:</label> <input type="number" id="room" name="room"></p>
13 <p><label for="femail">Email:</label> <input type="email" id="femail" name="femail"></p>
14 <p>Which mess? <input type="radio" id="mn" name="mess" value="north"><label for="mn">North</label> <input type="radio" id="ms" name="mess" value="south"><label for="ms">South</label></p>
·the M7 law applied: ONE shared name ("mess") makes them exclusive; ids stay unique for the labels
15 <p><input type="checkbox" id="veg" name="veg"><label for="veg">Uses veg counter</label> <input type="checkbox" id="juice" name="juice"><label for="juice">Uses juice counter</label></p>
16 <p><label for="rate">Rating:</label> <select id="rate" name="rate"><option>5</option><option>4</option><option>3</option><option>2</option><option>1</option></select></p>
17 <p><label for="sugg">Suggestions:</label> <textarea id="sugg" name="sugg" rows="3"></textarea></p>
18 <p><button type="submit">Send feedback</button></p>
19 </form>
20 </main>
21 <footer><p>Hostel Office · Block C</p></footer>
22</body>
23</html>
0 / 0
LIVE OUTPUT — A REAL, WORKING COPY OF THE TARGET
file:///C:/Users/you/Documents/hostel-mess-feedback/feedback.html

Mess Feedback — August

Which mess?

Hostel Office · Block C

Test like the examiner would: click each label (its control must focus), click North then South (only one holds), tick both checkboxes (both hold).
Checkpoint 19 · 36 — Form file shipped

A complete, semantic, validated form — typed by you. Now bank the exam question that is almost exactly this file.

20

Chunk 20 · The survey-form PYQ · ≈12 min

You just built the exam answer

The heaviest forms question in the bank asks for a survey form — the very shape you typed in the last chunk. Here is how to present it for full marks under exam time pressure.

PREVIOUS-YEAR QUESTION · P3·Q11a 4+4 MARKSCODE QUESTION

the sprint, renamed!Q11a. Design an HTML form for a student survey collecting: name, branch (dropdown), year (radio), hobbies (checkboxes) and feedback (multi-line), with a submit button. Explain the controls used. [4+4M]

Model answer — the code (4M), then the explanation table (4M):

1
THE FORM — PART 1 OF 2ONE FIELD PER PRESS
1<form action="#" method="post">
2 <p><label for="sname">Name:</label>
3 <input type="text" id="sname" name="sname" required></p>
4 <p><label for="branch">Branch:</label>
5 <select id="branch" name="branch">
6 <option>CSE</option><option>ECE</option><option>MECH</option>
7 </select></p>
2
…CONTINUED — RADIOS SHARE ONE name, CHECKBOXES DON'TONE GROUP PER PRESS
8 <p>Year:
9 <input type="radio" name="year" value="2"> II
10 <input type="radio" name="year" value="3"> III</p>
11 <p>Hobbies:
12 <input type="checkbox" name="music"> Music
13 <input type="checkbox" name="sports"> Sports</p>
14 <p><textarea name="fb" rows="3"></textarea></p>
15 <p><button type="submit">Submit</button></p>
16</form>
3
Explanation (the second 4 marks): text — free one-line entry, required blocks empty submits; select/option — dropdown for one of many fixed choices; radio — exactly one year, exclusivity from the shared name="year"; checkbox — independent yes/no per hobby.
4
textarea — multi-line feedback, closing tag required; button type="submit" — triggers validation, then sends every named value to the form's action URL by method="post". Exam craft: the explanation earns as much as the code — never skip it, and always mention the radio shared-name rule; it's the examiner's favourite checkline. ✓ 8/8
0 / 0
MODEL PROGRAM — THE SURVEY FORM, TYPED AND RUN
pyq-survey.html · the model answer as one runnable filestep through
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <title>Student Survey</title>
6</head>
7<body>
8<form action="#" method="post">
9 <p><label for="sname">Name:</label> <input type="text" id="sname" name="sname" required></p>
10 <p><label for="branch">Branch:</label> <select id="branch" name="branch"><option>CSE</option><option>ECE</option><option>MECH</option></select></p>
11 <p>Year: <input type="radio" name="year" value="2"> II <input type="radio" name="year" value="3"> III</p>
12 <p>Hobbies: <input type="checkbox" name="music"> Music <input type="checkbox" name="sports"> Sports</p>
13 <p><label for="fb">Feedback:</label> <textarea id="fb" name="fb" rows="3"></textarea></p>
14 <p><button type="submit">Submit</button></p>
15</form>
16</body>
17</html>
0 / 0
LIVE OUTPUT — THE EXAM ANSWER, RUNNING
file:///C:/Users/you/Documents/pyq-practice/pyq-survey.html
Year:
Hobbies:
Run the examiner's own tests: year radios exclude each other (shared name), both hobby checkboxes hold (own names), the textarea takes multiple lines. If your typed copy passes these three, the code half is full marks.
WANT THE SLOWER SECOND PASS?

The regular track's fswd_lab_02.html is a full session on exactly this build, with more variations and the query-string submit demonstration.

Checkpoint 20 · 36 — M9 complete

The 8-mark survey-form question is banked with its explanation half. HTML is done — everything from here is CSS.

21
M10 · CSS CORE · SCENARIO: CAMPUS RADIO PLAYLIST

Chunk 21 · Attaching CSS · ≈10 min

One playlist page, three ways to paint it

The campus radio club typed their Friday playlist in plain HTML — correct, complete, and grey. CSS is the language that paints it. Before any painting, one decision: where does the CSS live? There are exactly three answers, and the exam loves asking for all three.

START FROM ZERO — "WHAT EVEN IS CSS?" (OPTIONAL, 2 MIN)

CSS — Cascading Style Sheets — is a second language that sits beside HTML. HTML says what is on the page (a heading, a list of songs); CSS says how it looks (orange, centred, in a rounded card). A CSS rule has a fixed shape: a selector (who gets styled), then declarations inside braces (property: value; pairs).

"Cascading" means several rules can apply to one element, and the browser merges them by a fixed set of tie-break laws — you'll meet those laws where they matter.

METHODWHERE IT LIVESREACHWHEN IT'S RIGHT
Inlinestyle="…" attribute on one tagthat one element onlyquick one-off test; avoid in real projects
Internal<style> block inside <head>the whole pagesingle-page sites, exam answers
Externalseparate .css file, joined by <link>every page that links itreal multi-page sites — one file styles all
playlist.html — all three methods on one pagestep through
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <link rel="stylesheet" href="radio.css"> <!-- 3 · EXTERNAL -->
5 <style> /* 2 · INTERNAL */
6 h1
7 {
8 color: darkorange;
9 }
10 </style>
11</head>
12<body>
13 <h1>Friday Telugu Hits</h1>
14 <p style="color:seagreen;">Curated by the Radio Club</p> <!-- 1 · INLINE -->
·and radio.css (the external file) holds: body { font-family: Arial; background-color: oldlace; }
15</body>
16</html>
0 / 0
file:///C:/Users/you/Documents/raagam-radio/playlist.html

Friday Telugu Hits

Curated by the Radio Club

Three sources, one result: the external file set the cream background and Arial, the internal block turned the h1 orange, the inline attribute turned one paragraph green. All three can coexist — but real projects live in the external file.
10-SECOND SELF-CHECK

The radio club adds a second page, archive.html. Which attach method styles it with zero new CSS written?

That is the whole argument for external CSS: one radio.css, linked from every page. Change the file once, every page updates. Copying (inline or internal) means editing every page forever.

Checkpoint 21 · 36 — Three attach methods owned

Inline / internal / external, with where each lives and when each is right — a table the exam asks for almost every year.

22

Chunk 22 · Selectors · ≈12 min

Pointing at things — the five selectors that matter

Every CSS rule starts by pointing: which elements get this style? The playlist gives us a perfect test bed — songs, one featured song, one "now playing" song. Five selector types cover the entire Unit-1 exam.

playlist.html — the WHOLE file, five selector typesstep through · this exact file runs in the frame at chunk 31
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <title>Friday Playlist</title>
5 <style>
6 li /* 1 · ELEMENT — every li, no marking needed */
7 {
8 color: dimgray;
9 }
10 .featured /* 2 · CLASS — the dot: "anything marked featured" */
11 {
12 color: darkorange;
13 }
14 #now-playing /* 3 · ID — the hash: "THE one element with this id" */
15 {
16 background-color: lemonchiffon;
17 }
18 h1, h2 /* 4 · GROUP — comma: one rule, several targets */
19 {
20 font-family: Georgia, serif;
21 }
22 footer p /* 5 · DESCENDANT — space: "p INSIDE footer only" */
23 {
24 font-size: 12px;
25 }
·read the marks: nothing = tag name · dot = class (many allowed) · hash = id (exactly one) · comma = list · space = inside
26 </style>
27</head>
28<body>
29 <h1>Raagam Radio</h1>
30 <h2>Friday queue</h2>
31 <ul>
32 <li>Samajavaragamana</li>
33 <li class="featured">Naatu Naatu</li>
34 <li id="now-playing">Butta Bomma</li>
35 <li class="featured">Oo Antava</li>
36 <li>Inkem Inkem</li>
37 </ul>
38 <p>Requests close at 4 pm.</p>
39 <footer>
40 <p>Radio Club · Studio 2 · Vasavi College of Engineering</p>
41 </footer>
42</body>
43</html>
·notice line 38: that p is NOT inside footer, so footer p leaves it alone — the descendant SPACE is doing real work. Line 40's p IS inside, and shrinks to 12px
0 / 0
file:///C:/Users/you/Documents/raagam-radio/playlist.html

Friday queue

  • Samajavaragamana
  • Naatu Naatu class="featured"
  • Butta Bomma id="now-playing"
  • Oo Antava class="featured"

Radio Club · Studio 2 footer p

Why both class AND id? featured repeats — two songs carry it, one rule paints both. now-playing can only ever be one song at a time — that uniqueness is exactly what id promises.
PREVIOUS-YEAR QUESTION · P1·Q11b 4 MARKSDEFINITION + TYPES

you just used all five!Q11b. What is a CSS selector? List the types of selectors with an example each. [4M]

Model answer — definition first, then the five-row list:

1
Definition: a selector is the pattern at the start of a CSS rule that decides which HTML elements the rule's declarations apply to.
2
Types: elementp { } all paragraphs · class.featured { } any element with that class · id#now-playing { } the single element with that id.
3
grouph1, h2 { } several targets, one rule · descendantfooter p { } only p elements inside a footer. Exam craft: for 2 marks, the definition plus any three types with syntax is full credit — but knowing all five costs nothing now. ✓ 2/2
0 / 0
Checkpoint 22 · 36 — Selectors banked

Element, class, id, group, descendant — plus the 2-mark definition question, answered. Next: what goes inside the braces.

23

Chunk 23 · Core properties · ≈10 min

Inside the braces — the ten properties that answer every question

CSS has hundreds of properties; Unit 1 is scored on about ten. Watch the plain playlist card become a finished one, one declaration at a time — each line is a property you'll reuse in the box-model and responsive chunks ahead.

radio.css · styling the playlist card, property by propertystep through
1.song-card
2{
3 color: #7C2D12; /* text colour — name, hex or rgb() */
4 background-color: oldlace;
5 font-family: Verdana, Arial, sans-serif; /* fallback chain */
6 font-size: 16px;
7 font-weight: bold;
8 text-align: center;
9 text-decoration: none; /* kills link underlines */
10 border: 2px solid darkorange; /* width · style · colour */
11 border-radius: 12px;
12 line-height: 1.6;
13}
·every declaration is property : value ; — forget the semicolon and the NEXT line silently dies (the classic viva trap)
0 / 0
file:///C:/Users/you/Documents/raagam-radio/playlist.html
Naatu Naatu
M. M. Keeravani · 3:35
One class, one card. Every other song card on the page gets the identical look by carrying class="song-card" — the class-selector payoff from the last chunk.
10-SECOND SELF-CHECK

The club wrote font-family: Verdana, Arial, sans-serif;. A listener's phone has no Verdana. What happens?

The comma list is a fallback chain — the browser walks left to right and uses the first font it actually has. Always end with a generic family (sans-serif or serif) so there's a guaranteed landing.

Checkpoint 23 · 36 — Property kit loaded

Colour, background, fonts, alignment, borders, radius, line-height — the working vocabulary for every remaining chunk.

24

Chunk 24 · The role-of-CSS PYQ · ≈8 min

The 4-marker that joins M7 and M10

This question is a bridge: half theory (what CSS is for), half code (centre a form — your M9 skill plus today's properties). It has appeared with small wording changes across papers; the answer skeleton never changes.

PREVIOUS-YEAR QUESTION · P4·Q16a 4 MARKSTHEORY + CODE

theory 2M + code 2MQ16a. Explain the role of CSS in web design. Write CSS to display a login form at the centre of the page. [4M]

Model answer — four theory points, then the centring rule:

1
Role of CSS:separates presentation from structure — HTML holds content, CSS holds appearance, so either can change without breaking the other. ② consistency & reuse — one external stylesheet styles every page of a site identically.
2
less repetition, easier maintenance — change one rule, hundreds of elements update. ④ enables layout & responsiveness — positioning, box model and media queries (coming in the next modules) are all CSS jobs, impossible in plain HTML.
3
THE CENTRED FORM — FIXED WIDTH + AUTO MARGINSONE PROPERTY PER PRESS
1form
2{
3 width: 320px;
4 margin: 80px auto; /* auto splits leftover space equally */
5 text-align: center; /* centres the text INSIDE it */
6 border: 1px solid gray;
7 padding: 20px;
8}
4
Say the sentence that earns the code marks: "a block element with a fixed width and margin: auto on left and right is centred horizontally, because auto makes the browser split the remaining space equally." That one line shows the examiner you understand it, not memorised it. ✓ 4/4
0 / 0
MODEL PROGRAM — THE CENTRED LOGIN FORM, TYPED AND RUN
pyq-centre-form.html · the 2-mark CSS on a real formstep through
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <title>Login</title>
5 <style>
6 form { width: 320px; margin: 80px auto; /* THE centring line */
7 text-align: center; border: 1px solid gray; padding: 20px; }
8 </style>
9</head>
10<body>
11 <form>
12 <h3>Login</h3>
13 <label>Username <input type="text"></label><br><br>
14 <label>Password <input type="password"></label><br><br>
15 <input type="submit" value="Sign in">
16 </form>
17</body>
18</html>
0 / 0
file:///C:/Users/you/Documents/pyq-practice/pyq-centre-form.html

Login

Username

Password

See the equal white space left and right of the box? That is margin: auto splitting the leftover width — the box stays centred at any window size. Type in the fields; it's a real form.
WANT THE SLOWER SECOND PASS?

The regular track's fswd_lab_03.html spends a full session on selectors and the cascade with live experiments — ideal if the dot-vs-hash distinction still feels new.

Checkpoint 24 · 36 — M10 complete

CSS attach methods, selectors, core properties, and two PYQs banked. Next module: the box model — the diagram question worth guaranteed marks.

25
M11 · BOX MODEL & LAYOUT · SCENARIO: STUDENT ID CARD

Chunk 25 · The box model · ≈13 min

Every element is a box — and every box has four layers

The admin office wants a printable student ID card — an element with exact size, breathing room inside, a border, and space around it. Those four ideas have exact CSS names, and drawing them correctly is a guaranteed exam question.

THE BOX MODEL — THE ID CARD, X-RAYED
MARGIN — space OUTSIDE, pushes neighbours away (transparent) BORDER — the visible edge line PADDING — space INSIDE, between border and content CONTENT — Priya Sharma · CSE · 23B81A0512 width × height measure THIS box (by default)
id-card.css · the four layers, typedstep through
1.id-card
2{
3 width: 300px; /* the CONTENT box */
4 padding: 16px; /* inside gap — all four sides */
5 border: 3px solid #EA580C;
6 margin: 24px auto; /* outside gap — and auto centres it */
7}
·total width ON SCREEN = 300 + 16·2 + 3·2 = 338px — width alone is NOT the full story (next chunk fixes this)
0 / 0
file:///C:/Users/you/Documents/id-card.html
Priya Sharma
CSE · III Year · 23B81A0512
VCE · STUDENT ID
Padding keeps the name off the border; margin keeps the card off everything else; auto margins centre it — the same trick the M10 PYQ used for the form.
PREVIOUS-YEAR QUESTION · P1·Q16a 4 MARKSDIAGRAM QUESTION

draw the 4 rectangles!Q16a. Explain the CSS box model with a neat diagram. How does it help in designing page layouts for both screen and print? [4M]

Model answer — diagram + four layers + the screen/print line:

1
Draw first: four nested rectangles labelled margin (outermost) → borderpaddingcontent (innermost). A labelled diagram alone is usually 2 of the 4 marks.
The diagram, exactly as you should draw it on the answer sheet: CONTENT padding border margin outermost = margin, innermost = content label all four — that's the diagram marks ✓
2
Define each layer in one line: content — the text/image itself, sized by width/height; padding — transparent space inside the border; border — the visible edge; margin — transparent space outside, separating the element from its neighbours.
3
Layout help: every element is a box, so whole layouts are just boxes sized and spaced with these four controls — predictable spacing (margins), readable inner gaps (padding), alignment (margin: auto).
4
Screen and print: the same box model applies to both media — with @media print you can restate margins/borders in print-friendly units (cm, pt) and hide non-print boxes, so one HTML page lays out correctly on screen and on paper. (You'll write that @media block in M12.) ✓ 4/4
0 / 0
Checkpoint 25 · 36 — Box model drawn and banked

Four layers, in order, with the diagram PYQ answered. One leftover puzzle: that 338px surprise. Next chunk kills it.

26

Chunk 26 · box-sizing · ≈10 min

Why your 300px card printed 338px wide

The office printed the ID cards and the cutter ruined a whole sheet — every card came out 38px wider than planned. The culprit is the default box-sizing, and the fix is one line that almost every real stylesheet starts with.

content-box (the default)

width: 300px sizes only the content. Padding and border are added on top: 300 + 32 + 6 = 338px on screen. Maths you must redo every time padding changes.

border-box (what you want)

width: 300px is the total — border to border. Padding and border are carved out of the 300, content shrinks to fit. What you write is what you measure.

id-card.css · the one-line fixstep through
1* /* the universal selector — EVERY element */
2{
3 box-sizing: border-box;
4}
5.id-card
6{
7 width: 300px; /* NOW it truly occupies 300px */
8 padding: 16px;
9 border: 3px solid #EA580C;
10}
·with border-box: content shrinks to 300 − 32 − 6 = 262px, and the card measures exactly 300 — the cutter is happy
0 / 0
file:///C:/Users/you/Documents/id-card.html
content-box  ·  measures 338px
border-box  ·  measures 300px exactly
Same width: 300px in both rules — only box-sizing differs. This * { box-sizing: border-box; } reset is the first line of this very page's stylesheet.
10-SECOND SELF-CHECK

With box-sizing: border-box, width: 200px and padding: 20px, how wide is the element on screen?

border-box makes width mean the outer measurement (through the border). The 20px padding each side comes out of the 200, leaving 160px of content — the total stays 200.

Checkpoint 26 · 36 — Sizing under control

content-box vs border-box, the width maths, and the universal reset. Last layout tool: making boxes sit where you want.

27

Chunk 27 · display & position · ≈12 min

Stacking, flowing, pinning — the traffic laws of boxes

Two last controls finish the layout kit. display decides how a box flows with its neighbours; position lets you take a box out of the flow entirely — like the "VALID 2026" stamp that must sit on the ID card's corner.

VALUEBEHAVIOURID-CARD EXAMPLE
display: blockfull width, starts a new linethe card itself, headings, paragraphs
display: inlineflows within text; width/height ignoreda span highlighting the roll number
display: inline-blockflows in a line but accepts width/heightthe row of small course badges
display: noneremoved completely — takes no spacethe "print instructions" note when printing
position: relativestays in flow; becomes the anchor for childrenthe card, so the stamp can pin to it
position: absoluteout of flow; pinned to nearest positioned ancestorthe VALID stamp, top-right corner
position: fixedpinned to the screen; ignores scrollinga "back to top" button on long pages
id-card.css · pinning the stampstep through
12.id-card
13{
14 position: relative; /* "children may pin to ME" */
15}
16.stamp
17{
18 position: absolute; /* leave the flow */
19 top: 8px;
20 right: 8px; /* measured from the card's corner */
21}
·the pair to memorise: parent = relative, child = absolute + top/right — the child pins to the parent, not the page
0 / 0
file:///C:/Users/you/Documents/id-card.html
Priya Sharma
CSE · III Year · 23B81A0512
VCE · STUDENT ID
VALID 2026
The stamp ignores the text flow and pins to the card's top-right — because its parent is position: relative. Remove that one line and the stamp would pin to the whole page instead. Try predicting that before you ever debug it.
10-SECOND SELF-CHECK

You want a chat button that stays at the bottom-right of the screen even while the user scrolls a long page. Which position?

absolute scrolls away with the page; fixed is glued to the glass of the screen itself. (The TOPICS button floating on this very page is position: fixed.)

Checkpoint 27 · 36 — M11 complete

Box model, border-box, display values, and the relative/absolute pinning pair. Next: making one page work on every screen size.

28
M12 · RESPONSIVE · SCENARIO: MOVIE-TICKET PAGE

Chunk 28 · The viewport tag · ≈9 min

Why your ticket page looks like a postage stamp on a phone

The film club's movie-ticket page is perfect on a laptop. On a phone it renders as a tiny, zoomed-out miniature you have to pinch at. Nothing is wrong with the CSS — the page is missing one line in the head.

START FROM ZERO — "WHY DO PHONES ZOOM OUT?" (OPTIONAL, 2 MIN)

Old websites were built for 980px-wide desktop screens. So phone browsers adopted a survival trick: pretend to be 980px wide, render the page, then shrink the whole picture to fit the real screen. Result: everything is technically visible and nothing is readable.

The viewport meta tag is the page telling the browser: "I'm built for small screens too — don't pretend, use your real width." Only then do phone-friendly styles get a chance to act.

ticket.html · head — the one required linestep through
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <title>Movie Night — Book a Seat</title>
7</head>
·width=device-width → "use the REAL screen width" · initial-scale=1.0 → "start at 100% zoom, no shrinking"
8<body>
9 <h1>Movie Night</h1>
10 <p class="tagline">Sat 7 PM · Auditorium · Film Club screening</p>
11 <div class="ticket">Seat H-12 · ₹120</div>
12 <div class="book">BOOK NOW</div>
13 <p class="smallprint">Doors open 6:30 PM. Carry your student ID.</p>
14</body>
15</html>
·this is the real ticket.html from your folder — open it in the frame at chunk 31 and press 390px to watch line 5 do its job
0 / 0
the same page, on the same phone
Movie Night
Sat 7 PM · Auditorium · Film Club screening
Seat H-12 · ₹120  ·  Row H, aisle side
BOOK NOW
Doors open 6:30 PM. Carry your student ID. Snacks counter accepts UPI. Latecomers admitted at interval only.
everything squint-sized 🔍
NO viewport tag — browser fakes 980px, then shrinks
Movie Night
Sat 7 PM · Auditorium
Seat H-12 · ₹120
BOOK NOW
Doors open 6:30 PM. Carry your student ID. Snacks counter accepts UPI.
WITH viewport tag — real width, readable at 100%
Same HTML, same CSS — the only difference is one meta line. Without it, every media query you write next chunk is dead code on phones, because the browser is still pretending to be a desktop.
10-SECOND SELF-CHECK

A classmate wrote perfect phone-width media queries, but the phone still shows the zoomed-out desktop view. Most likely cause?

Without the viewport tag the phone reports a fake 980px width, so a query like max-width: 600px never fires. Tag first, queries second — always.

Checkpoint 28 · 36 — Viewport unlocked

You can write the tag from memory and explain both halves of its content value. Now the styles that respond to it.

29

Chunk 29 · @media queries · ≈11 min

CSS with an if-condition

A media query wraps ordinary rules in a condition: "apply these only if the screen is at most 600px wide" — or "only when printing". The ticket page uses one to stack its seat map on phones.

ticket.css · the phone rulestep through
20.seat-map
21{
22 width: 60%; /* desktop: map beside the details */
23}
24@media (max-width: 600px) /* the CONDITION */
25{
26 .seat-map
27 {
28 width: 100%; /* phone: full width, stacked */
29 }
30}
·read it aloud: "IF the viewport is 600px or narrower, THEN seat-map is full width" — the desktop rule still applies everywhere else
0 / 0
resize the window — the query fires at 600px
≥ 601px · side by side
SEAT MAP (60%)
DETAILS
≤ 600px · stacked
SEAT MAP (100%)
DETAILS
One stylesheet, two layouts — the query switches them automatically. (Drag this browser window narrower right now: this page itself is doing exactly this.)
PREVIOUS-YEAR QUESTION · P3·Q11b 4 MARKSCODE QUESTION

4 conditions = 4 marksQ11b. Write CSS media queries to change a page's background colour on: mobile (<600px), tablet (600–992px), desktop (>992px), and when the page is printed. [4M]

Model answer — four blocks, one mark each:

1
MOBILE + TABLET — max-width, THEN A RANGE WITH andONE QUERY PER PRESS
1@media (max-width: 599px)
2{
3 body { background-color: lightyellow; }
4}
5@media (min-width: 600px) and (max-width: 992px)
6{
7 body { background-color: lightblue; }
8}
2
DESKTOP + PRINT — min-width, THEN THE print MEDIA TYPEONE QUERY PER PRESS
1@media (min-width: 993px)
2{
3 body { background-color: lightgreen; }
4}
5@media print
6{
7 body { background-color: white; }
8}
3
Explanation lines that seal the marks: max-width = "at most", min-width = "at least", and joins two conditions into a range, and print is a media type — it targets the printed page, not a screen size. White background on print saves ink and matches paper. ✓ 4/4
0 / 0
MODEL PROGRAM — ONE PAGE, FOUR BACKGROUNDS, RUN ON EVERY DEVICE
pyq-media-bg.html · the four blocks in one working filestep through
1<!DOCTYPE html>
2<html lang="en">
3<head> <meta name="viewport" content="width=device-width, initial-scale=1.0">
4 <title>Responsive Backgrounds</title>
5 <style>
6 body { font-family: Arial; text-align: center; }
7 @media (max-width: 599px) { body { background-color: lightyellow; } }
8 @media (min-width: 600px) and (max-width: 992px) { body { background-color: lightblue; } }
9 @media (min-width: 993px) { body { background-color: lightgreen; } }
10 @media print { body { background-color: white; } }
11 </style>
12 </head>
13 <body>
14 <h2>Resize me — or print me</h2>
·599/600 and 992/993 — the boundaries never overlap, so exactly ONE background wins at every width
15</body>
16</html>
0 / 0
the same file, opened at four widths
📱 PHONE · 480px wide → rule 1 fires
Resize me — or print me
background-color: lightyellow
💻 TABLET · 800px wide → rule 2 fires
Resize me — or print me
background-color: lightblue
🖥️ DESKTOP · 1280px wide → rule 3 fires
Resize me — or print me
background-color: lightgreen
🖨️ Ctrl+P · PRINT PREVIEW → rule 4 fires
Resize me — or print me
background-color: white — saves ink
Same file, four outputs — nothing was edited between frames; only the viewport width (or the print command) changed. That is the whole point of media queries.
Checkpoint 29 · 36 — Queries written from memory

max-width, min-width, ranges with and, and @media print — the 4-mark question is banked.

30

Chunk 30 · Mobile-first · ≈10 min

Design for the phone, enhance for the desktop

Mobile-first is a strategy, not a property: write your base CSS for the smallest screen (one column, big touch targets), then use min-width queries to add the desktop luxuries. Most of your ticket buyers are on phones anyway.

Desktop-first (the old way)

Base CSS assumes a wide screen; max-width queries then undo column layouts, shrink fonts, hide things. You spend your queries subtracting.

Mobile-first (the modern default)

Base CSS is the phone layout — naturally simple. min-width queries then add columns and side panels as space appears. You spend your queries enhancing.

PREVIOUS-YEAR QUESTION · P3·Q16a 4 MARKSTHEORY QUESTION

define + 3 pillars + whyQ16a. What is responsive web design? Explain the role of the viewport and media queries in achieving it. [4M]

Model answer — definition, three pillars, and the payoff:

1
Definition: responsive web design (RWD) is building one page that adapts its layout automatically to any screen size — phone, tablet, desktop — instead of maintaining separate mobile and desktop sites.
2
Pillar 1 — the viewport tag: <meta name="viewport" content="width=device-width, initial-scale=1.0"> makes the phone report its real width instead of simulating a desktop — the switch that lets everything else work.
3
Pillar 2 — media queries: @media (max-width: 600px) { … } applies different rules per screen range — stacking columns, resizing text, hiding side panels. Pillar 3 — fluid sizing: widths in % (and flexible images with max-width: 100%) let content stretch and shrink between the query breakpoints.
4
The payoff sentence: "one HTML codebase serves every device, improving usability and maintenance — the viewport tag makes the device report its true size, and media queries restyle the page at chosen breakpoints." Add the phrase mobile-first (base styles for phones, min-width queries add desktop features) for the examiner's nod. ✓ 4/4
0 / 0
WANT THE SLOWER SECOND PASS?

The regular track's class-11.html and class-12.html build a fully responsive page step by step with live resize demos — the long-form version of this module.

Checkpoint 30 · 36 — M12 complete

Viewport, queries, mobile-first, and both responsive PYQs banked. All theory done — one final build sprint remains.

31
M13 · BUILD SPRINT 3 — TYPE, DON'T READ

Chunk 31 · Sprint: a complete stylesheet · ≈15 min

Build study-cafe/ — every CSS skill, one file

The Poshtik campus café is opening a quiet study corner and wants a one-page site. The HTML is simple — the whole exercise is the stylesheet: selectors, box model, a background image, and a phone breakpoint. From the asset pack you'll need poshtik-campus-logo.jpg (put it in study-cafe/img/). Close the reveals and type.

The brief. Folder study-cafe/ with index.html, css/style.css and img/poshtik-campus-logo.jpg. The page: header (h1 + tagline), a menu list where two items carry class="today", one id="wifi-note" paragraph, footer. The stylesheet must:

  1. External only — one <link>, zero inline styles (the M10 lesson, enforced).
  2. Start with * { box-sizing: border-box; } (the M11 reset).
  3. body: Verdana fallback chain, oldlace background.
  4. header: the café logo as a background-image, no-repeat, positioned right.
  5. .today items orange + bold; #wifi-note on a lemonchiffon strip.
  6. A 700px card centred with margin: auto — and a max-width: 600px media query making it full-width on phones.

Logo showing? Card centred? Query firing when you narrow the window? Then compare, don't copy.

study-cafe/css/style.css — referencestep through
1* { box-sizing: border-box; }
2body
3{
4 font-family: Verdana, Arial, sans-serif;
5 background-color: oldlace;
6 margin: 0;
7}
8header
9{
10 background-image: url("../img/poshtik-campus-logo.jpg"); /* path from the CSS file! */
11 background-repeat: no-repeat;
12 background-position: right center;
13 background-size: 90px;
14 padding: 24px;
15}
·the classic trap: url() resolves relative to the CSS FILE (css/), so the logo needs ../img/ to climb out first — the M4 dot-dot rule returns
16.card
17{
18 width: 700px;
19 margin: 24px auto;
20 background: white; padding: 20px; border-radius: 12px;
21}
22.today { color: darkorange; font-weight: bold; }
23#wifi-note { background-color: lemonchiffon; padding: 8px; }
24@media (max-width: 600px)
25{
26 .card { width: 100%; } /* the phone override */
27}
0 / 0
LIVE OUTPUT — A REAL, WORKING COPY OF THE TARGET
file:///C:/Users/you/Documents/study-cafe/index.html
Poshtik Study Corner
quiet tables · filter coffee · till 10 pm
Menu
  • Filter coffee — ₹25 .today
  • Masala chai — ₹15
  • Millet cookies — ₹30 .today

Wi-Fi: PoshtikStudy · ask at the counter #wifi-note

The logo arrives by CSS (background-image), not an <img> tag — decoration belongs to the stylesheet, content belongs to the HTML. That one sentence is exam gold.

Now the real thing — those files, running in a browser.

Everything above was a preview of the target. Below are the genuine files in a real browser frame: study-cafe/index.html, the css/style.css it links, and the logo in img/. Nothing here is drawn. The card is white and centred because that stylesheet says so; the logo sits at the header's right because background-position really put it there — through a ../img/ path that genuinely had to climb out of css/ to find it.

REAL FILES, REAL BROWSER · THE STYLESHEETS YOU JUST TYPED, EXECUTING
file:///C:/Users/you/Documents/study-cafe/index.html
FRAME WIDTH →
Press 390px and watch the last rule in each file earn its place. The café card drops width: 700px for 100%, and the ID card drops 300px — because narrowing the frame really does cross the max-width: 600px threshold. Switch to playlist.html to see all five selector types painting one page, to id-card.html to see two cards measuring exactly 300px thanks to the border-box reset, and to ticket.html — chunk 28's movie page — where 390px turns the 435px ticket block into a readable full-width one. This is your CSS executing, not an illustration of it.
Checkpoint 31 · 36 — Stylesheet shipped

External file, reset, selectors, background image, centred card, breakpoint — the whole CSS half of Unit 1 in one file you typed.

32

Chunk 32 · Two style PYQs · ≈10 min

The sprint, re-asked two ways

Both of these questions are the study-cafe stylesheet wearing exam clothes. Watch how each maps straight back to lines you just typed.

PREVIOUS-YEAR QUESTION · P2·Q16a 4 MARKSCODE QUESTION

body rule + centring — you own bothQ16a. Write CSS to style a student profile page: all text in Verdana, page background light grey, the profile card centred with a rounded border and inner spacing. [4M]

Model answer — two rules do everything:

1
THE WHOLE ANSWER — body SETS THE STAGE, .profile IS THE CARDONE RULE PER PRESS
1body
2{
3 font-family: Verdana, Arial, sans-serif;
4 background-color: #EEEEEE;
5}
6.profile
7{
8 width: 400px;
9 margin: 50px auto; /* centred */
10 padding: 20px; /* inner spacing */
11 border: 2px solid gray;
12 border-radius: 15px; /* rounded */
13 background-color: white;
14}
2
Score map: font on body (inheritance styles all text — say the word "inheritance") · background — 1M · centring via width + margin auto — 1M · border-radius + padding — 1M. Four marks, ten lines, zero surprises. ✓ 4/4
0 / 0
MODEL PROGRAM — THE PROFILE PAGE, TYPED AND RUN
pyq-profile.html · the two answer rules on a real pagestep through
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <title>My Profile</title>
5 <style>
6 body { font-family: Verdana, Arial, sans-serif; background-color: #EEEEEE; }
7 .profile { width: 400px; margin: 50px auto; padding: 20px;
8 border: 2px solid gray; border-radius: 15px; background-color: white; }
9 </style>
10</head>
11<body>
12 <div class="profile">
13 <h2>Priya Sharma</h2>
14 <p>CSE · III Year · loves CSS grids and filter coffee.</p>
15 </div>
16</body>
17</html>
0 / 0
file:///C:/Users/you/Documents/pyq-practice/pyq-profile.html

Priya Sharma

CSE · III Year · loves CSS grids and filter coffee.

Check all four marks with your eyes: Verdana everywhere (inheritance from body), grey page, the card centred with equal grey on both sides, rounded corners with padding keeping the text off the border. ✓
PREVIOUS-YEAR QUESTION · P3·Q11b (LAB) 4 MARKSCASCADE + BACKGROUND

"cascading" made concreteQ11b. An element is targeted by an inline style, an internal rule and an external rule, each setting a different colour. Which wins, and why? Also write the CSS to place a logo image as a page background that does not repeat. [4M]

Model answer — the priority ladder, then the background rule:

1
Who wins: the inline style. The cascade's specificity ladder for the same property is: inline (highest) → then whichever internal/external rule is more specific — and between two equal rules, the one that comes later in source order wins. Internal vs external has no inherent priority; position and specificity decide.
2
THE NON-REPEATING LOGO BACKGROUND — STRAIGHT FROM YOUR SPRINTONE PROPERTY PER PRESS
1body
2{
3 background-image: url("img/poshtik-campus-logo.jpg");
4 background-repeat: no-repeat;
5 background-position: center top;
6}
3
Exam craft: the examiner wants the word "cascade" and the order stated explicitly. And remember your own debugging: without no-repeat the logo tiles across the whole page — mention it as the default behaviour being overridden. ✓ 4/4
0 / 0
MODEL PROGRAM — CASCADE PROOF + THE LOGO BACKGROUND, RUN
pyq-cascade.html · three colours fight, one winsstep through
1<!DOCTYPE html>
2<html lang="en">
3<head> <title>Cascade Proof</title>
4 <link rel="stylesheet" href="ext.css"> <!-- ext.css: h1 { color: green; } -->
5 <style>
6 h1 { color: blue; } /* internal */
7 body { background-image: url("img/poshtik-campus-logo.jpg");
8 background-repeat: no-repeat; background-position: center top; }
9 </style>
10</head>
11<body>
12 <h1 style="color: red;">Which colour am I?</h1> <!-- inline -->
13</body>
14</html>
·three rules target the h1: external green, internal blue, inline red — run it and see who wins
0 / 0
file:///C:/Users/you/Documents/pyq-practice/pyq-cascade.html

Which colour am I?

RED wins — inline beats internal & external · logo sits once at centre-top, no tiling

Both halves of the question, one screenshot: the inline red beat blue and green (say "cascade: inline is highest"), and the logo appears exactly once because no-repeat overrides the tile-everything default.
Checkpoint 32 · 36 — Cascade & profile PYQs banked

Inline > specific > later-in-order, plus two 4-mark code answers that are your sprint lines rearranged.

33

Chunk 33 · The last two PYQs · ≈10 min

Closing the question bank — 17 of 17

Two more and every previous-year question mapped to Unit 1 is answered inside this resource. One reaches back to forms (M7–M9), one forward from responsive (M12) — proof the unit is a single connected skill.

PREVIOUS-YEAR QUESTION · P1·Q11a 4+4 MARKSCODE QUESTION

the mess form, re-skinnedQ11a. Create an HTML form for an insurance claim: policy number (text), date of incident (date), claim type (dropdown), description (multi-line) and a submit button. [4+4M]

Model answer — the M9 skeleton with new labels + one new input type:

1
THE CLAIM FORM — NOTE type="date", THE ONLY NEW PIECEONE FIELD PER PRESS
1<form action="#" method="post">
2 <p><label for="pno">Policy no:</label>
3 <input type="text" id="pno" name="pno" required></p>
4 <p><label for="doi">Date of incident:</label>
5 <input type="date" id="doi" name="doi"></p>
6 <p><label for="ctype">Claim type:</label>
7 <select id="ctype" name="ctype">
8 <option>Health</option><option>Vehicle</option><option>Property</option>
9 </select></p>
10 <p><textarea name="desc" rows="4"></textarea></p>
11 <p><button type="submit">Submit claim</button></p>
12</form>
2
Exam craft: every exam form question is the same skeleton — form → labelled inputs → choice control → textarea → submit. Only the labels and one input type change. type="date" gives a native date picker with zero extra code — name it in your explanation line. ✓ 4/4
0 / 0
MODEL PROGRAM — THE CLAIM FORM, TYPED AND RUN (IT'S LIVE — TRY IT)
pyq-claim-form.html · the answer, exactly as writtenstep through
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <title>Insurance Claim</title>
5</head>
6<body>
7 <form action="#" method="post">
8 <p><label for="pno">Policy no:</label> <input type="text" id="pno" name="pno" required></p>
9 <p><label for="doi">Date of incident:</label> <input type="date" id="doi" name="doi"></p>
10 <p><label for="ctype">Claim type:</label>
11 <select id="ctype" name="ctype"><option>Health</option><option>Vehicle</option><option>Property</option></select></p>
12 <p><label for="desc">Description:</label><br> <textarea id="desc" name="desc" rows="4"></textarea></p>
13 <p><button type="submit">Submit claim</button></p>
14 </form>
15</body>
16</html>
0 / 0
LIVE OUTPUT — CLICK THE DATE FIELD, OPEN THE DROPDOWN
file:///C:/Users/you/Documents/pyq-practice/pyq-claim-form.html


Click the date field — the calendar the browser gives you for free is why type="date" is worth naming in your answer. Every control here is the model code, running.
PREVIOUS-YEAR QUESTION · P4·Q11b 4 MARKS@media print

the ticket must print cleanQ11b. Write CSS so that when a page is printed: the navigation bar and buttons are hidden, the background is white, and text is black in a serif font. [4M]

Model answer — one @media print block:

1
THE PRINT STYLESHEET — HIDE, WHITEN, SERIFONE RULE PER PRESS
1@media print
2{
3 nav, button /* group selector from M10 */
4 {
5 display: none; /* removed entirely — no gap left */
6 }
7 body
8 {
9 background-color: white;
10 color: black;
11 font-family: Georgia, "Times New Roman", serif;
12 }
13}
2
Why each line scores: @media print — targets the printed page only (screen styles untouched) · display: none — the M11 value that removes an element and its space (navigation is useless on paper) · white/black — saves ink, maximum contrast · serif — traditional print readability. Say "screen styles remain unchanged" for the final nod. ✓ 4/4
0 / 0
MODEL PROGRAM — THE SAME PAGE, ON SCREEN vs ON PAPER
pyq-print.html · a ticket page carrying the print blockstep through
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <title>My Ticket</title>
5 <style>
6 body { background: #0F172A; color: white; font-family: Arial; } /* screen look */
7 @media print {
8 nav, button { display: none; }
9 body { background-color: white; color: black; font-family: Georgia, serif; }
10 }
11 </style>
12 </head>
13 <body>
14 <nav>Home · My bookings · Help</nav>
15 <h2>Movie ticket — seat F14</h2> <button>Cancel booking</button>
16</body>
17</html>
0 / 0
left: on screen · right: Ctrl+P print preview
🖥️ ON SCREEN
Home · My bookings · Help  nav
Movie ticket — seat F14
Cancel booking button
🖨️ PRINTED — @media print APPLIED
Movie ticket — seat F14
nav and button GONE (display:none) · white paper · black serif text
Same HTML, two media: the dark screen page keeps its nav and cancel button; the paper version drops both, flips to white/black and switches to a serif — every requirement of the question, visible at once.
Checkpoint 33 · 36 — M13 complete · question bank 17/17

Every mapped previous-year question for Unit 1 now has a model answer you've stepped through. Two chunks left: the recap and the test.

34
M14 · RAPID RECAP — READ THIS THE MORNING OF THE EXAM

Chunk 34 · Rapid recap · ≈8 min

The whole unit on one screen

Every fact below was earned in a chunk above. If a row feels foggy, its chunk number is right there — tap TOPICS and jump back. If every row feels obvious, you're ready for the test.

TOPICTHE ONE-LINE VERSIONCHUNK
HTTPclients ask, servers answer — request/response, stateless3
URLscheme :// domain / path / file4
Skeletondoctype → html → head (title, meta) → body5
Text tagsh1–h6 by importance · p · ul/ol → li6
Links & imagesa href wraps · img src alt is empty7
Pathssame folder = name · into = folder/ · up = ../8–9
Tablestable → tr → th/td · rowspan/colspan merge12
Formslabel for = input id · radios share one name · checkboxes don't13–15
Semanticsheader nav main article aside footer — tags that mean something16–18
Attach CSSinline (one tag) · internal (one page) · external (whole site — best)21
Selectorstag · .class · #id · a, b group · a b descendant22
Cascadeinline > more specific > later in source order32
Box modelcontent → padding → border → margin (draw it!)25
border-boxwidth means the TOTAL — padding/border carved out26
display / positionblock · inline · none — relative parent + absolute child pins27
Responsiveviewport meta + @media (max/min-width) + % widths · mobile-first28–30
@media printhide nav/buttons · white background · serif33
The five sentences examiners reward

① "alt shows when the image can't." ② "Radios are exclusive because they share one name." ③ "Semantic tags describe meaning, helping accessibility and SEO." ④ "margin: auto centres a fixed-width block." ⑤ "Without the viewport tag, media queries never fire on phones."

The five traps that cost marks

① Forgetting alt. ② Different names on radio pairs. ③ <li> outside a list. ④ Counting padding into width without border-box. ⑤ Writing @media answers without the closing extra brace.

Checkpoint 34 · 36 — Recap swept

Seventeen rows, five golden sentences, five traps. One thing left: prove it under the clock.

35
M15 · UNIT-END TEST — REAL PAPER, REAL CLOCK

Chunk 35 · The timed paper · 20 min sharp

Twenty minutes, pen on paper, no scrolling up

Take an actual sheet of paper. Start the clock, answer all five, and do not scroll back — the exam hall won't let you either. The mix mirrors the real paper: two short, two code, one diagram.

20:00 Press start when your paper is ready. The clock turns red at 3 minutes. When it hits zero — pens down, exactly like the hall.
UNIT 1 · PRACTICE PAPER 2+2+4+4+4 = 16 MARKS

Q1. Define HTTP. Who sends the request and who sends the response? [2M]

Q2. Differentiate <div> and <span> with one example each. [2M]

Q3. Create an HTML form for a library membership: name (text, required), branch (dropdown), membership type (radio: monthly/annual) and a submit button. Explain why the radios need a shared name. [4M]

Q4. Explain the CSS box model with a neat labelled diagram. With box-sizing: border-box, width: 250px and padding: 15px, what is the on-screen width? [4M]

Q5. Write media queries to give a page a light-yellow background below 600px and light-green above 992px, and to hide the nav when printed. [4M]

Checkpoint 35 · 36 — Paper attempted under the clock

Whatever the result, that was the real rehearsal. Now grade yourself honestly against the key.

36

Chunk 36 · Mark yourself · ≈10 min

The key — and what your score means

Grade like a strict examiner: no half-sympathy marks. Each answer's checklist is below; a point earns its mark only if it's actually on your paper.

Only open this after the clock stopped. Grading mid-test teaches you nothing.

QFULL MARKS REQUIRE…REVISIT
Q1 [2M]HTTP = HyperText Transfer Protocol, the request/response rules between browser and server (1M) · client/browser sends the request, server sends the response (1M)chunk 3
Q2 [2M]div = block-level generic container, starts a new line (1M) · span = inline generic wrapper inside text (1M) · one example each, e.g. a div grouping a card vs a span colouring one wordchunk 16
Q3 [4M]form tag with method (1M) · labelled text input with required + select with options (1M) · two radios sharing name="mtype" + submit (1M) · the sentence: "a shared name makes the browser treat them as one exclusive group" (1M)chunks 13–15, 19
Q4 [4M]diagram: four labelled nested boxes in order (2M) · one-line definition of each layer (1M) · answer: 250px — border-box carves the padding out of the stated width (1M)chunks 25–26
Q5 [4M]@media (max-width: 599px) body lightyellow (1M) · @media (min-width: 993px) body lightgreen (1M) · @media print { nav { display: none; } } (1M) · correct double-brace nesting everywhere (1M)chunks 29, 33
13–16: exam-ready

Keep it warm: reread the chunk-34 cheat sheet the night before, and re-type one build sprint folder from memory. You're done here.

Below 13: targeted repair, not a re-read

Each lost mark names its chunk in the REVISIT column — redo only those chunks, then retake this paper tomorrow. Two focused passes beat one long one.

Checkpoint 36 · 36 — Unit 1 crash course complete

36 chunks, 3 typed builds, 17 previous-year questions, 1 timed paper. Web basics, HTML5 and CSS — revised end to end.