Chapter 5. Semantics: Making Sense of Styles

Semantics: Making Sense of Styles

When we speak to each other, we understand as much from the context of our words as from the words themselves. To be understood, we need to be clear about the context of our statements. We use semantics to do this, putting ideas together in a logical manner. We don’t think about it, it’s an instinct like breathing—we do it all the time.

In CSS, where you place your styles defines where and how they will be applied. You need to understand how styles cascade down the document, and how to apply different styles depending on the medium. With a bit of practice, the semantics of CSS will also become as instinctual ...

Get Speaking in Styles: Fundamentals of CSS now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.