3 XML is a subset of SGML.
Differences Between HTML
and XHTML
The Ultimate CSS Reference 410
notation for empty elements??”for example, we could use
instead of
??”which HTML does not. A conforming XML document must be well
formed, which, among other things, means that there must be an end tag for every
start tag, and that nested tags must be closed in the right order.4 When an XML
parser encounters an error relating to the document??™s well-formedness, it must abort,
whereas an HTML parser is expected to attempt to recover and continue.
There are three areas in which the differences between HTML and XHTML affect
our use of CSS:
?– case sensitivity (p. 412)
?– optional tags (p. 413)
?– properties for the root element (p. 415)
Note, though, that these differences apply only when an XHTML document is served
as an application of XML; that is, with a MIME type of application/xhtml+xml,
application/xml, or text/xml. An XHTML document served with a MIME type of
text/html must be parsed and interpreted as HTML, so the HTML rules apply in
this case.
Pages:
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595