Comparing HTML to XML to XHTML
HTML 4.01HyperText Markup Language |
XHTML 1.0EXtensible HyperText Markup Language |
XML 1.0EXtensible Markup Language |
|
| Definition: | This current version of HTML does include some XML concepts, but it is much looser than XHTML. | XHTML includes all elements in HTML 4.01 combined with the syntax of XML -- a Structer/Cleaner Version. It is a hybrid of HTML and XML. | XML is designed to describe data using a database concept for organizing data. It allows its users to define their own tags. |
| Browser Acceptance: | NS6 • FireFox • Safari • IE 6 • IE7 | NS6 • FireFox • Safari •
|
NS6 • FireFox • Safari • IE 6 • IE7 |
| Tags must be lowercase: | NO | YES | YES |
| Always use an end tag: | NO | YES
include <p> AND </p> |
YES |
| Use ID & Name Together: | NO | YES
example: <div id="header" name="header1"> |
YES |
| Use Space & Slash in empty tags: | NO | YES
example: <br /> |
YES |
| Place Attribute values in Quotes: | NO | YES
example: <img src="xmlgraphic.pg"> |
YES |
| Permits Overlapping Tags: | YES
example: <p> <b>Hello</p></b> |
NO | NO |
| Semantic Web applications: | Limited | YES | YES |
| A Key Component in AJAX: | NO | YES | YES |
| May be used to write code for Scaleable Vector Graphics: | NO | YES | YES |
| Validation Service: | W3C Validator | W3C Validator | W3C Validator |
| Being Upgraded by W3C.org: | NO | YES
Working on XHTML version 2.0 |
MAYBE
Discussing version 2.0 |
| Transitional ("Loose") Document Type Declaration (DTD): | <!DOCTYPE html →PUBLIC "-//W3C//DTD → HTML 4.01 → Transitional//EN" "http://www.w3.org/ →TR/html4/loose.dtd"> |
<!DOCTYPE html PUBLIC" → -//W3C//DTD XHTML 1.0 → Transitional//EN" "http://www.w3.org/ →TR/xhtml1/DTD/ → xhtml1-transitional.dtd"> |
Use XHTML version, but watch W3C.org DTD List Recommendations. |
| Strict Document Type Declaration (DTD): | <!DOCTYPE html → PUBLIC → "-//W3C//DTD → HTML 4.01//EN" http://www.w3.org/ → TR/html4/strict.dtd"> |
<!DOCTYPE html PUBLIC " → //W3C//DTD → XHTML 1.0 Strict//EN" "http://www.w3.org/ → TR/xhtml1/DTD/xhtml1-strict.dtd"> |
Use XHTML version, but watch W3C.org DTD List Recommendations. |
© Scott A. Frangos & WebHelperMagazine.com -- all rights reserved. | Version 1.1 - 11.16.07