Best Markup for
- An XHTML 1.0
DOCTYPEcannot make browsers process
text/htmlusing an XML parser.
- Neither can a processing instruction nor other parts of an XML Prolog.
- XHTML is not, strictly speaking, compatible with HTML:
- Technical benefits of XHTML which are false:
- XHTML 1.0 is limited to the elements and attributes of HTML 4.01. There’s nothing new.
- Mobile browsers don’t use XML parsers. It does not help interoperability.
- XHTML is less efficient by using more filesize than the equivalent HTML.
- Both require writing void elements a specific way. HTML’s way is shorter.
- HTML is well-formed when valid. It uses less syntax and more logic to achieve this.
- Both are equally compatible with CSS.
- Theoretical benefits of XHTML which are false:
- XHTML Modularisation 1.1 permits legacy markup. It isn’t ‘more semantic’.
- XHTML websites are rarely XML compatible. Therefore, XML did not clean up the web.
- XHTML syntax is not pretty or logical. Compare
- XHTML is harder to learn due to lots of restrictions and complexities.
- Validating to HTML 4.01 Strict enforces more best practices than XHTML 1.0 Transitional.
- Viable web browsers must support HTML because that’s what the web uses.
- HTML has good support, widespread use and active development. XHTML2 does not.
Use HTML 4.01 Strict. It is better than XHTML for