Padding
A CSS property that adds space inside an element's border, between the content area and the border. Unlike margin, padding is inside the element.
What it does: padding: 20px adds 20px of space on all four sides inside the border, pushing the content away from the edges. padding-top and padding-left set only their respective sides, leaving the other sides unchanged. With two values, the first sets top and bottom, the second sets left and right. This is the standard 2-value shorthand pattern. The padding shorthand accepts 1, 2, 3 or 4 values. Five values is invalid and will be ignored by the browser.
Common mistakes: CSS declarations require a colon. It should be padding: 10px; not padding 10px;. The padding shorthand accepts 1, 2, 3 or 4 values — not 5. Five values is invalid CSS.
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
paddingFill 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 →