/en-tutor-prep-s2-term1-ict-css/
/en-tutor-prep-s2-term1-ict-css/
General Inquiry: info@TutorZone.com.hk
Office Hours: Monday to Saturday - 9:00 AM to 6:00 PM
WhatsApp Monday to Sunday - 24 hours
Hotline: +852 6828 1809
Instant Support: +852 9061 3106

S2 Term 1 | ICT: CSS and the Box Model | 45-minute flow, teaching script, common errors, practice with answers

S2 Term 1 | ICT: CSS and the Box Model | 45-minute flow, teaching script, common errors, practice with answers

  • 2026-11-30

Lesson prep guide · S2 Term 1 ICT

Students change colours but cannot explain why a box is wider than declared, nor why the same rule sometimes loses. One box model and one priority line settle both.

Lesson objectives Students can (1) name three selectors and their weights 1, 10, 100; (2) compute a total width of 364 pixels and the 256-pixel content area under border-box; (3) compute 60 pixels per column in a 940-pixel, 12-column grid with 20-pixel gutters.

01 Prior knowledge check (first 3 minutes)

If any item below fails, fix it first, or this lesson stalls:

Skill Quick check Pass standard
Multiplication 20 pixels of padding on each side is how much in total? 40
Subtraction 940 minus 11 gutters of 20 leaves how much for columns? 720
Division That divided by 12 columns is how much each? 60

02 Lesson flow (45 minutes)

Time Stage Tutor does Student does
0–4 min Opening diagnostic Show a box declared 300 that occupies 364 and ask why Most blame the browser, not padding and border
4–14 min Selectors and weight Element, class and ID with weights 1, 10, 100 Write three selectors for one element and decide which wins
14–26 min Box model Read the figure: 300 of content, 20 padding, 2 border, 10 margin, total 364 Work 364, then the 256 content area under border-box
26–37 min Columns Show 940 minus 11 gutters, divided by 12, giving 60 Work the column width and compare fixed pixels with percentages
37–41 min Responsive When a media query changes the column count, and why twelve columns fail on phones One sentence on what a breakpoint does
41–45 min Exit check Collect three answers and note selector, box or column errors Work without notes

03 Teaching script (read it aloud)

Act one: selectors and weight

Three ways to write a rule. An element selector, p, takes every paragraph and weighs 1; a class selector, .note, takes every element with that class and weighs 10; an ID selector, #main, takes the single element with that ID and weighs 100. When rules collide the larger number wins, so an ID beats a class and a class beats an element. The usual mistake is thinking that the rule written later always wins: weight is compared first, and only equal weights are settled by order.

Students restate: compare weight first, 1, 10, 100, then order.

Act two: the box model

Most common misconception: that width 300px means the box occupies 300 pixels. The 300 is the content area; with 20 of padding, 2 of border and 10 of margin on each side the box occupies 300 plus 40 plus 4 plus 20, which is 364 pixels.

Margin falls outside the background but still takes space; padding sits inside it. With box-sizing set to border-box the declared 300 includes padding and border, so the total stays 300 but the content area shrinks to 256. Both answers should be available, and the model should be named.

Students restate: width is content only; padding and border push it to 364; border-box locks it at 300.

Act three: columns and responsiveness

A container of 940 pixels in 12 columns with 20-pixel gutters: subtract the gutters first, 940 minus 11 times 20 is 720, then divide by 12 for 60 pixels each. A phone a few hundred pixels wide cannot hold twelve columns of under ten pixels, so a media query drops to one or two columns. Fixed pixels are predictable but rigid, percentages adapt but are harder to align, and real pages mix the two.

Students restate: subtract gutters before dividing; narrow screens drop columns, not type size.

04 Question types and steps

Type Example Steps Answer
Selector matching Element, class, ID Match the syntax with its weight p is 1, .note is 10, #main is 100
Weight comparison Three conflicting rules Compare numbers first, order second ID beats class, class beats element
Box model 300 content, 20 padding, 2 border, 10 margin Content plus twice each of the others 364 pixels
Column width 940 pixels, 12 columns, 20 gutters Subtract gutters, then divide 60 pixels each
CSS box model: 300 of content plus four layers, 364 pixels in allcontent 300 × 120padding 20margin 10border 2content 300+ padding 40+ border 4+ margin 20= 364 pxwith box-sizing: border-box the total stays 300

A block 300 pixels wide, with 20 pixels of padding, 2 of border and 10 of margin on each side, occupies 300 plus 40 plus 4 plus 20, which is 364 pixels. With box-sizing set to border-box the declared 300 includes padding and border, so the total stays 300 but the content area shrinks to 256. Students usually add padding and stop there.

Sanity check (must teach):300 plus 40 plus 4 plus 20 is 364; under border-box the content area is 300 minus 40 minus 4, 256; and 940 minus 220 over 12 is 60. The three numbers check each other.

05 Three independent practice questions

Question Answer What to observe
Content 300, padding 20, border 2, margin 10 on each side: what is the total width? 364 pixels Padding alone leaves border and margin out
With box-sizing: border-box and width 300, what is the content area? 256 pixels, 300 minus 40 minus 4 300 means padding and border were not deducted
940 pixels in 12 columns with 20 gutters: how wide is each column? 60 pixels Dividing straight away gives 78, which ignores the gutters

06 Common errors and correction lines

Error Student usually writes Tutor says
Padding only “300 plus 40 is 340, that is the total” “Add 2 of border and 10 of margin on each side: 364 in all.”
Later rule always wins “The rule written last always applies” “Weight comes first: ID 100 over class 10 over element 1, then order.”
Margin inside the background “Margin is part of the background” “Margin sits outside the background and only takes layout space.”
Straight division “940 divided by 12 is the column width” “Subtract 11 gutters of 20 first, then divide, which gives 60.”

07 Homework (paper and question numbers)

08 Exit check (last 3 minutes)

Question Answer Verdict
Three selectors and their weights? Element 1, class 10, ID 100 Names without numbers means act one is retaught
Total width for 300, 20, 2, 10? 364 pixels 340 means border and margin were dropped
940 pixels, 12 columns, 20 gutters: each column? 60 pixels 78 means gutters were not subtracted

09 Tutor FAQ

Which year group is this page for?

S2 Term 1 ICT styling; S1 can take the box model only, S3 can add flexbox, grid and breakpoint design.

Can 45 minutes cover selectors, the box model and columns?

Yes. Selectors and the box model take 22 minutes, 49 per cent; columns 11, responsiveness 4, the exit check 4.

Is there a paper to set as homework?

Yes. Questions 9, 11 and 12 of part three of the S2 ICT paper cover structure; they pair well with this page.

Find a tutor freeTutor sign-up →

©2026 TutorZone · www.tutorzone.com.hk · Terms of use · All rights reserved. Original TutorZone material for personal study and teaching only; not for resale or republication.

Join as a tutor or coach — academic, music, sports, arts, STEM. Free to register. See how it works →