Using Multiple Approaches

You aren't limited to using only one of the described style sheet approaches. You can use all three simultaneously if needed. One case in which you might want to do this is on an intranet site where you have the following:

  • Global styles— Certain styles used on every page are best stored in a single style sheet file and linked to each page with the <link /> element. This might apply to styles mandated as a corporate standard, such as the use of a plain white background and a single typeface.

  • Subsection styles— Intranet sites typically have many subdivisions, each with its own look and feel. To support a subdivision's look, you can store styles within the <STYLE> element in the head of each document in the subdivision. ...

Get Platinum Edition Using XHTML™, XML, and Java™ 2 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.