Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Do you want your Web pages to be usable on mobile devices, like cell phones and personal digital assistants (PDAs)? If you do, then you need to keep some things in mind when creating your pages. While mobile devices are getting more sophisticated, their support for XHTML and CSS still varies widely among the various devices. Some support CSS, some don’t; some display XHTML really well, others make a mess of it. The best thing you can do is anticipate potential problems and plan for the future when support will be better.
First, remember that you can write a “handheld” specific style sheet by using the media attribute of the <link> element.
Unfortunately, support for the “handheld” style sheet media type is still limited, so even if you’ve got a handheld style sheet link in your Web page, that doesn’t mean the browser on your phone will actually use it. So, you need to keep some general design techniques in mind so your Web page looks good on both computer monitors and small devices: