2.3 XHTML

Team-Fly    

 
Webmaster in a Nutshell, 3rd Edition
By Robert Eckstein, Stephen Spainhour
Table of Contents
Chapter 2.  HTML Overview

2.3 XHTML

When the W3C defined the Extended Markup Language (XML), they also defined XHTML as a more rigorous , XML-compliant version of HTML. XHTML is designed to satisfy XML rules while still remaining legitimate HTML.

For example, although HTML specifies the <p> tag to start a paragraph, and the </p> tag to end it, you can easily omit the </p>, because HTML browsers will generally infer them. However, XHTML requires both <p> and </p> tags for all paragraphs, without exceptions.

The goal of the W3C is that eventually, HTML will migrate completely over to XHTML. However, that migration is likely to be slow. As long as people who write HTML documents manually can get away with omitting </p> tags and still have browsers parse them without complaint, they will continue to do so.

Most HTML authors today don't really need to worry about XHTML if all they're interested in is having their documents parsed by a web browser. But if you write tools that generate HTML, or if you expect that one day your document might be used in a venue other than the Web, you should take the time to learn XHTML. The differences between XHTML and HTML are trivial compared to the benefits of writing XML-compliant documents.

For more information on XHTML, refere to www.w3.org, or to the book HTML and XHTML: The Definitive Guide .


Team-Fly    
Top


Webmaster in a Nutshell
Webmaster in a Nutshell, Third Edition
ISBN: 0596003579
EAN: 2147483647
Year: 2002
Pages: 412

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