Skip to content
Should We Stop Teaching Width and Height to CSS Beginners? episode artwork

May 1, 2025 20 min

Should We Stop Teaching Width and Height to CSS Beginners?

from General Musings with Kevin Powell Hosted by Kevin Powell

The survey link (I lied, it's 3 questions, but they're all super short!): https://3g5kprf8905.typeform.com/to/laWyvkB6 In this episode, I talk about why I think we should appreciate browser defaults more when writing CSS, and ended up having a mini lightbulb moment about teaching CSS - maybe we shouldn't introduce width and height properties right away to beginners? It seems like that just creates habits we have to unlearn later. I talk about how block elements naturally want to take up the full width but only be as tall as they need to be, and why working with these behaviors (instead of fighting them) makes for better responsive designs. I go on a bit of a tangent about setting constraints with min/max values rather than forcing exact dimensions. Along the way, I point out some common mistakes I see a lot - like using that universal reset with the star selector (please don't do that!) or declaring the same font-family fifteen times when you could just put it on the body once.

Episode details come from the podcast's RSS feed.

Embed this episode

Ready to play

Should We Stop Teaching Width and Height to CSS Beginners?

0:00 20:47

No transcript yet.

Requests help us decide what to transcribe next.

Frequently asked questions

How long is this episode of General Musings with Kevin Powell?

This episode is 20 minutes long.

When was this General Musings with Kevin Powell episode published?

This episode was published on May 1, 2025.

Can I download this General Musings with Kevin Powell episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.