Chapter 11. Layout with Styles

Using CSS for layout has several advantages over using other methods, like tables (which we’ll discuss in Chapter 14). First, CSS is good for creating liquid layouts, that expand or contract depending on the size of your visitor’s monitor. In addition, keeping content separate from layout instructions means you can easily apply the same layout to an entire Web site all at once. You can then change the layout of the whole site simply by modifying the CSS file. The CSS + (X)HTML combination also tends to produce smaller file sizes, which means your visitors don’t have to wait as long to see your site. Finally, since CSS and XHTML are the current standards, pages that adhere to their rules are guaranteed to be supported ...

Get HTML for the World Wide Web, Fifth Edition, with XHTML and CSS 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.