Beginning XHTML
October 30, 2000
|
This excerpt is an abridged version of a chapter from the Wrox Press book
Beginning XHTML.
|
This chapter looks at different media types and why they are necessary. Main
subjects include the role of Cascading Style Sheets in supporting media types,
the differences between media types and how to handle them and the future of
style sheets in XML.
This book is for anyone wanting to mark up web pages and use scripting to
enhance the quality of their pages. It will be useful for those who wish to
enter the world of web development with an advantage over existing
developers, for those who are already developing pages and wish to stay
current with the latest technological changes, and for those who want to
access new markets and reduce their workload.
Different Media Types
The World Wide Web is a wonderful thing: computers all over the world
— connected together — sharing documents and multimedia. In
recent years, the World Wide Web has begun to grow beyond this comfy
computer-based family of devices. The Web is now accessible on mobile
phones, handheld digital assistants, and televisions.
This phenomenon has placed a considerable burden on content authors. No
longer can they write their documents with expectations on how that content
will be displayed. Each of these new devices represents a quite different
medium from the computer: the physical characteristics of the devices are
different, the relationship between the device and the user is different,
and the cost of using the device is different.
Until recently, authors had little choice but to author or re-author their
content with each device in mind. With the advent of Cascading Style Sheets
(CSS) and something called 'media types', this began to change.
In this chapter, we will learn how to use CSS and media types to tailor our
documents to different devices.
In this chapter we will cover the following:
- What media types are and why we need them
- What the role of Cascading Style Sheets is in supporting media types
- How to associate style sheets with different media types
- How to use @media rules and @import rules
- The differences between media types and strategies for handling them
- The future of style sheets in XML
First, we will define media types and try to understand why they are
important.
Contents:
What Are Media Types?
Associating Style Sheets With Media Types
Different Style Sheets for Different Devices
Application of the Different Styles
Using The <Link> Element
Using the '@media' Rules
Creating Media-Dependent Style Sheets
Printing And Paginated Media
Using the 'page-break-before' Property
Other Properties
The 'size' Property
Applying Margins to the Body Element
Strategies for Handling Media Types
User Agent Constraints
Using XSL Transformations
How It Works
|
Title:
Beginning XHTML
| |
ISBN: 1861003439
|
US Price: $ 39.99
Canadian Price: C$ 59.95
UK Price: £ 28.99
| |
Publication Date: Mar 00
| |
Pages: 733
| |
©1999
Wrox Press Limited, US and UK.
|
Beginning XHTML
What Are Media Types
|