Why XHTML?

 < Day Day Up > 



This book's markup examples are written in XHTML, or eXtensible HyperText Markup Language. Technically speaking, XHTML is the reformulation of HTML 4 in XML. What does that mean? Well, you're familiar with HTML, right? XHTML is just like that—with a few extra rules.

To once again quote the W3C (www.w3.org/TR/xhtml1/#xhtml):

"The XHTML family is the next step in the evolution of the Internet. By migrating to XHTML today, content developers can enter the XML world with all of its attendant benefits, while still remaining confident in their content's backward and future compatibility."

That's a good place to start—future compatibility. By authoring web pages now using XHTML, we're taking steps to ensure these pages will work with future browsers and devices.

XHTML is also designed to be readable by the highest number of browsers, devices, and software. Markup that is written in XHTML stands a better chance of being properly understood no matter what is reading it.

But there are rules.

In the world of XHTML, stricter rules exist for what is considered valid markup. All tags and attributes must be in lowercase, attributes must be enclosed with double quotes, and all tags must eventually close. These are a few of the rules inherited from XML. But these rules are good for you.

In addition to future compatibility, by adhering to the stricter rules that govern proper and valid XHTML, designers and developers can more easily debug code (especially helpful when multiple authors are working on the same markup), and their pages have a better chance of rendering properly on browsers that understand standards as well. Throughout this book, we'll be using XHTML for all of our examples.



 < Day Day Up > 



Web Standards Solutions. The Markup and Style Handbook
Web Standards Solutions: The Markup and Style Handbook (Pioneering Series)
ISBN: 1590593812
EAN: 2147483647
Year: 2003
Pages: 119
Authors: Dan Cederholm

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net