HTML and CSS Reference
The second layer is the presentation layer , which is the core focus of this topic. It describes
how your document will be presented to the visitor, including such details as layout, typography,
colors, decorative images, and even nonvisual presentations like the voice family a screen
reader may use. Generally, the presentation layer of a web document is written using CSS.
Besides these two layers, you'll also find references to the behavior layer of a web docu-
ment. We don't discuss this layer in depth, but you should understand that it refers to using
update, add, or remove items from the document based on the user's behavior.
Scripting and Ajax:From Novice to Professional, by Christian Heilmann (Apress, 2006, ISBN 1590596803).
For a simple example of how the three layers work in conjunction with one another,
consider a basic “contact us” form on a company's web site. The form itself is marked-up text,
produced in (X)HTML. That text is then styled into the aesthetic presentation you see on screen
date your input and lets you know that you skipped a required field. After you fix that oversight,
let you know something is happening before returning a message such as “Thank you! We'll
get back to you as soon as possible.”
In this chapter, we've covered the basics of modern (X)HTML markup. Because CSS expects
you to have written clean, valid, and semantic markup for your documents, it's essential to
have this piece of the equation in great shape before moving on to the presentation layer of
your page or site. Many CSS headaches can be solved simply by getting your (X)HTML right.
Speaking of CSS, let's move on to Chapter 2, where we'll cover the basics of what CSS is and
how it works.