Embedded Style Information

Figure 9.2 shows the W3C's page for the Extensible Stylesheet Language (XSL). The style information is stored in the document head, as shown in the excerpt of XHTML source code in Listing 9.1. The first line says that the <div> element of class main should have a 40-pixel top margin. Next, it says that level 1 headings should have a 24-pixel bottom margin, and finally that terms in a definition list should be rendered in italics. The rest of the style information is devoted to setting up style classes. These classes can then be referenced by multiple tags by using the class attribute.

Figure 9.2. Embedded style information is set up for use on a particular page.
Code Listing 9.1. Embedded Style Information in the W3C's ...

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.