Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h1>XHTML</h1> <h2>QA</h2> <p>XHTML has mature QA tools, but looser DTDs (e.g. <code>&lt;textarea rows=""</code> is a conformance error in HTML 4.01 and XHTML 1.0, but only a validity error in HTML 4.01<code>*</code>). This is despite XHTML 1.0 being, theoretically, HTML 4.01 expressed as XML. There are numerous differences, which are not documented in the "<a href="http://www.w3.org/TR/xhtml1/#diffs" rel="nofollow noreferrer">Differences with HTML 4</a>" section of the spec.</p> <p>An XHTML document when served with a MIME type of application/xhtml+xml (see below) needs to conform 100% to XML standards, i.e. it needs to be "well formed XML". Even a single unescaped ampersand can cause the parser (the browser) to throw a warning and refuse to render the document. When creating dynamic XHTML sites which may include content supplied by third parties (e.g. any user input), great care needs to be taken to escape any and all invalid character sequences, to not allow invalid tags or attributes and to properly nest all elements.</p> <h2>Browser Support</h2> <ul> <li>XHTML as text/html is well supported, but you have to jump through <a href="http://www.w3.org/TR/xhtml-media-types/#compatGuidelines" rel="nofollow noreferrer">compatibility</a> hoops. Without jumping through those hoops a perfectly valid page may fail to render (e.g. <code>&lt;script type="text/javascript" src="foo" /&gt;</code> causing the rest of the document to be treated as a script instead of HTML) or display other issues.</li> <li>XHTML as application/xhtml+xml is reasonably well supported by most browsers (minor bugs may exist). It does not work at all in Internet Explorer &lt;= 8.</li> </ul> <h2>MIME type application/xhtml+xml vs text/html</h2> <p>XHTML served as text/html is neither XHTML nor HTML. It's handled like HTML by the browser, but since it's not HTML, it's treated as tag soup. Since Internet Explorer does not know how to handle XHTML using application/xhtml+xml, it will need to be served as text/html for IE only. Which means XHTML for IE is always tag soup, unless the differences between HTML and XHTML are tended to as well (see <a href="http://www.w3.org/TR/xhtml1/#diffs" rel="nofollow noreferrer">Differences with HTML 4</a>).</p> <p>Welcome to a world of pain. You get downstream proxy issues (you have to vary caching based on whatever request header you perform your conditional on). The document structure changes (e.g. tables without a <code>&lt;tbody&gt;</code> tag may or may not have a <code>&lt;tbody&gt;</code> element depending on the content-type). It is a lot of work to produce, essentially, two almost identical documents.</p> <h2>XHTML and Javascript</h2> <p>When an XHTML document is parsed with a proper application/xhtml+xml MIME type, there may be differences when manipulating DOM elements via Javascript. Some scripts which have not been prepared properly may work differently or fail in an XHTML environment. <code>**</code></p> <h2>Advantages of using XHTML (as application/xhtml+xml)</h2> <ul> <li>Allows direct interleaving of other XML formats like MathML and SVG.</li> <li>Is theoretically faster to parse. The difference is negligible in practice though.</li> </ul> <hr> <p><code>*</code> Paragraph needs some polishing.<br> <code>**</code> I have seen this in practice, but have little background knowledge, please expand.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload