Externalizing Our Style

Because we’ve been creating a style sheet meant for multiple press releases, now would be a good time to take our style sheet and make it external. This enables us to have one style sheet file that can style multiple press-release documents. The advantage is that if we make a change to the external style sheet, then the changes will be reflected in all of the documents that use that style sheet.

The first step is to take the entire style sheet shown in Listing 2.1 and place it in a text file of its own. After that’s done, we need to remove the first and last lines because there can be no HTML markup in an external style sheet! So the <style> and </style> lines have to be deleted.

No Comments

When we say “no HTML,” we ...

Get Eric Meyer on CSS: Mastering the Language of Web Design 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.