Click here to download NeoPlanet!

PC Magazine

  PC Tech

Taking Style Sheets to the Next Level

Introduction

Media Types

Aural Style Sheets

Visual Rendering Model

Summary and Resources

Figure 1



X10.com - The SuperSite for Home Automation!

Wintec Direct

 
  Categories
World Wide Web

Taking Style Sheets to the Next Level
Media Types

Continued from Introduction

A significant shortcoming of HyperText Markup Language is that HTML pages are generally designed for viewing on a computer screen. If you've ever tried to print a Web page, you know that what looks good on the screen doesn't necessarily look good in print. In fact, some Web pages print illegibly or not at all.

The CSS-2 specification defines a set of media types and details how they could be handled in various situations. To improve flexibility, the list of media types outlined in CSS-2 is not meant to be definitive. This will allow the browser or other application handling the page to support additional media types in the future.

HTML 4.0 created the foundation for working with various types of media, but it did not specifically define extensions that you could use with these additional media types. Thus CSS-2 takes over where HTML 4.0 left off, by defining specific extensions for various types of media. There are many media types, including TV, hand-held computer, and Braille. This article will focus on the two primary ones, screen and print. Later in the article, I will also discuss the aural media type, used with aural style sheets.

One of the reasons Web pages don't print well is that your computer screen is a continuous medium, and a printout is paged. On the screen, your pages flow continuously, and all the user has to do is scroll up or down. Here you don't have to worry about page breaks, margins, or any of the other layout elements that can make a printed document look terrific.

On the other hand, when you print a document, the flow of the document from page to page really matters. You want your page breaks to flow well, and you want the layout of each page to be precise. You don't want your pages to be all jumbled up, as happens when you print a typical Web page, especially one that contains large graphical banners or image maps.

With CSS-2, you can define precisely how a Web page should look in print. You accomplish this by defining how the printer should handle each printed page, and setting margins and inserting page breaks are only the beginning.

Because documents often have different types of pages, you can also tell the printer how to handle them within the document. For example, CSS-2 allows you to give the first page of the document a unique layout, and you can make left and right pages follow a different scheme as well. Combined with precise control over media extensions, this has finally given Web publishers real control over how their pages look. It makes quite a difference.

Next: Aural Style Sheets

Published as Internet User in the 12/1/98 issue of PC Magazine.

 
 SPONSORED LINKS
QUANTUM  Storage solutions to count on 24 hours/day, CLICK HERE
Sprint  FrameRelay: See why users rate Sprint #1 for frame relay
Beyond.com  Click here for free software!
Software  X10.com -- The SuperSite for Home Automation
Books  Buy a gift for MOM, a book from barnesandnoble.com
 ZDNET FEATURED LINKS
Freebies!  The latest FREE files - yours to download and keep!
Shop Smart  Compare prices on over 7,000 computer products & save
Contest  Win a Diamond MP3 Rio from ZDNet Auctions!
 MAGAZINE OFFERS
Free Issue  Get a risk-free issue of RED HERRING magazine today!

TOP
Copyright (c) 1998 Ziff-Davis Inc.