Width and height
A CSS property that sets the maximum width an element is allowed to reach. The element can be smaller but never wider. Useful for responsive layouts.
What it does: min-height: 50vh means the section is always at least half the viewport tall. It can grow taller with content but never shorter. width: 100% makes the paragraph as wide as its parent element. On a 600px parent, it becomes 600px. max-width: 100% sets an upper limit. The image can be its natural size or smaller but never wider than the container. CSS property names are case-sensitive and must be lowercase. 'Width' is invalid — use 'width'. By default, width and height apply to the content area only. Padding and border are added on top. Use box-sizing: border-box to include them.
Common mistakes: CSS declarations require a colon. It should be width: 200px; not width 200px;. CSS declarations require a colon. It should be height: 150px; not height 150px;.
Free printable worksheet with full answer key — or add this module to a journey and assign it to your class.
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
max-widthFill in the Blanks
Spot the Error
Create a free class, add this module to a journey, and track who's stuck.
Create a free teacher account →No credit card. No setup fee. Make a class and invite students in under three minutes.
Practice this topic interactively, track progress, and unlock badges.
Start Learning Free →