XHTML Vs HTML
XHTML Vs HTML
Due to the fact that XHTML is an XML application, certain practices that were perfectly legal in
SGML-based HTML 4 must be changed. You already have seen XHTML syntax in previous chapter,
so differences between XHTML and HTML are very obvious. Following is the comparison between
XHTML and HTML.
<td rowspan="3">
<td rowspan=3>
Attribute Minimization
XML does not support attribute minimization. Attribute-value pairs must be written in full. Attribute
names such as compact and checked cannot occur in elements without their value being
specified.
CORRECT: Non Minimized Attributes
<dl compact="compact">
<dl compact>
Maps sequences of one or more white space characters includinglinebreaks to a single inter-
word space.
Wrapping the content of the script or style element within a CDATA marked section avoids the
expansion of these entities.
<script type="text/JavaScript">
<![CDATA[
... unescaped VB or Java Script here... ...
]]>
</script>
Under XHTML, the interpretation of these values is case-sensitive so all of these values are defined
in lower-case.
<!DOCTYPE html....>
<html>
<head> ... </head>
<body> ... </body>
</html>
Loading [MathJax]/jax/output/HTML-CSS/jax.js