Older Browsers

Some older browsers such as Netscape 3.0 and Internet Explorer 4.0 do have varying degrees of difficulty with XHTML constructs such as empty-element tags. For example, Netscape 3 places two horizontal lines when it sees <hr></hr> and none at all when it sees <hr/>. It is unwise to use the full panoply of XML syntax when serving XHTML to browsers. In particular, here are my suggestions.

  • Include at least one space before the /> in an empty-element tag.

  • Do not use CDATA sections.

  • Do not use processing instructions such as xml-stylesheet, especially in the document prolog.

  • Do not use character references such as &#x111; or &#968;.

  • Do not use entity references that were not available in HTML 1.0 such as &rdquo; and &tau;.

  • Do not include ...

Get Effective XML: 50 Specific Ways to Improve Your XML now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.