So far we have covered the XHTML required to markup a page. XHTML wraps around the content of the page, telling the content what it is (a paragraph, heading, etc). For appearance, we turn to CSS.
|“what something is”||“how something looks”|
|semantic markup of data||rules for appearance of content|
The CSS acronym is best explained in the following order:
Rules governing the appearance of web page content.
The rules are predominantly in a document, or several documents, that as separate from the HTML: a separate “sheet” (although they do not have to be).
These rules can have various priorities, meaning that the appearance of the page can adjust to various circumstances (for example, different rules might cover the appearance of a web page when it is printed versus when it is displayed on the screen). The rules can also be overlapping, syncretic or conflicting: if more than one rule commands the appearance of an element, CSS sorts out which style rule takes priority.
CSS gives several advantages over alternative methods of determining the appearance of web pages:
It separates appearance from content, meaning that one can be changed without having to adjust or untangle the other.
They assure consistency of appearance across pages of a web site.