Separating Appearance from Structure

Separating appearance from structure is a key concept in CSS. The basic idea is that HTML should be responsible for specifying the structural elements of a document (headings, paragraphs, lists, hypertext links, and so on), while CSS should be responsible for specifying the appearance of those elements. Both HTML 4 and XHTML are formulated to facilitate this division of labor. There are some important reasons for separating appearance from structure in HTML documents:

  • It facilitates visually richer presentations while conserving bandwidth, in that a style need only be stated once for an element and the same style sheet can be used for all the pages within a site. Web designers need no longer rely on using ...

Get Cascading Style Sheets (CSS) by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.