HTML and CSS Reference
In-Depth Information
Although this code does not follow the correct syntax, most browsers still render it
correctly. Likewise, the following code would likely be interpreted correctly even though
the colspan attribute value is not enclosed in quotation marks:
<tdƒcolspan=2>Heading</td>
Although a browser that is very forgiving of mistakes in syntax might seem beneficial
to Web page designers, this behavior also affects the browser design. By making allow-
ances for inconsistently applied HTML code, the source code for the browser itself must
be larger and more complex to deal with all contingencies. This can become an issue for
browsers that run on handheld devices, which are more limited in the space they allot
for software. Because of these concerns, several developers began to push for a version
of HTML in which syntax rules would be more strictly enforced. This was done by mak-
ing HTML into an XML vocabulary.
XML and XHTML
Extensible Markup Language (XML) can be thought of as “SGML light”—a language
like SGML used to create markup languages but without SGML's complexity and size.
XML has been used to create specialized markup languages called XML vocabularies
such as MathML for mathematical content, CML for documenting chemical structures,
and MusicML for describing musical scores. Individual users can also create their own
markup languages tailored for specific needs. For instance, the following code is an
excerpt from a MusicML document describing Mozart's Piano Sonata in A Major :
<work>
ƒƒƒ<work-number>K.ƒ331</work-number>
ƒƒƒ<work-title>PianoƒSonataƒinƒAƒMajor</work-title>
</work>
<identification>
ƒƒƒ<creatorƒtype=”composer”>WolfgangƒAmadeusƒMozart</creator>
ƒƒƒ<rights>Copyrightƒ2003ƒRecordareƒLLC</rights>
</identification>
Aside from the different tag names, the appearance and structure of this document are
very similar to what you've seen with HTML; this should not be a surprise because both
are markup languages. XHTML is another example of an XML vocabulary. As with HTML
and XML, the W3C maintains the specifications and standards for XHTML. Figure 9-1
summarizes the different versions of XHTML.
figure 9-1
versions of XHtML
Version
Date Released
Description
XHTML 1.0
2001
This version is a reformulation of HTML 4.01 as an XML vocab-
ulary, bringing the rigor of XML to Web document code.
XHTML 1.1
2002
A minor update to XHTML 1.0 that allows for modularity and
simplifies writing extensions to the language.
XHTML 2.0
Discontinued in 2009
A follow-up version to XHTML 1.1; XHTML 2.0 was not back-
ward compatible with earlier XHTML versions and was dis-
continued due to lack of support.
XHTML5
In development
A version of HTML5 written as an XML vocabulary; unlike
XHTML 2.0, XHTML5 will be backward compatible with ear-
lier XHTML versions.
Search WWH ::




Custom Search