Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
|
front-end-tech:xhtml:html-vs.-xhtml [Jul 6, 2026 12:50 AM] 78.95.234.82 removed |
— (current) | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | = HTML vs. XHTML - Which One to Choose = | ||
| - | There is much debate over whether HTML or XHTML is the ' | ||
| - | * [[http:// | ||
| - | * [[http:// | ||
| - | |||
| - | I won't rehash the historical reasoning (see those blog posts), but basically, it comes down to this: | ||
| - | * Almost all documents on the web are served with content type '' | ||
| - | * Because the content type determines how a document is parsed, all documents are parsed as HTML (even if they have an XHTML doctype or XHTML code). | ||
| - | * Thus, the argument goes, if you send XHTML code, you're really sending invalid HTML code, which is more likely to break the HTML parser than proper HTML code. Therefore, just write valid, standards-compliant, | ||
| - | * The opposite argument notes that the W3C says that [[http:// | ||
| - | |||
| - | In my opinion, it really doesn' | ||
| - | |||
| - | === Recommended XHTML and HTML doctypes === | ||
| - | |||
| - | **XHTML:** | ||
| - | <code html> | ||
| - | < | ||
| - | </ | ||
| - | |||
| - | **HTML:** | ||
| - | <code html> | ||
| - | < | ||
| - | </ | ||
| - | As you can see on the [[http:// | ||