Publishing with XML - Herong's Tutorial Examples - v4.02, by Dr. Herong Yang
Assigning CSS Files to Web Pages
This section describes how CSS files are assigned to HTML Web pages.
CSS properties can be defined right inside the HTML element as shown in the following example:
<p style="{text-align: center;}">Show in the middle.</p>
But if you can also put all CSS properties into a file and assign that file to all of your Web pages to be more efficient. hyPub suggests that:
1. Store all CSS properties in a file called _hypub.css.
2. Assign _hypub.css to Web pages inside the "head" element with the "link" element as shown below:
<html> <head> ... <link rel="stylesheet" type="text/css" href="_hypub.css"/> </head> <body> ... </body> </html>
Table of Contents
Ideas on Publishing Books using XML
Overview of hyPub - A Simple XML Publishing Tool
Writing Book Contents in XHTML Source Files
Transforming Book Source Files with XSL Technology
Designing Web Page Layouts with Tables
►Controlling Web Page Appearance with CSS
Suggested CSS Definitions for Book Web Pages
►Assigning CSS Files to Web Pages
Sharing HTML Codes with JavaScript Files
Generating Web Pages with hyPub
Formatting Printable Documents with XSL-FO