XHTML

>> Monday, August 3, 2009

The Extensible Hypertext Markup Language, or XHTML, is a markup language that has the same depth of expression as HTML, but also conforms to XML syntax.
While HTML prior to HTML 5 was defined as an application of Standard Generalized Markup Language (SGML), a very flexible markup language, XHTML is an application of XML, a more restrictive subset of SGML. Because they need to be well-formed, true XHTML documents allow for automated processing to be performed using standard XML tools—unlike HTML, which requires a relatively complex, lenient, and generally custom parser. XHTML can be thought of as the intersection of HTML and XML in many respects, since it is a reformulation of HTML in XML. XHTML 1.0 became a World Wide Web Consortium (W3C) Recommendation on January 26, 2000. XHTML 1.1 became a W3C Recommendation on May 31, 2001.
Overview
XHTML is "a reformulation of the three HTML 4 document types as applications of XML 1.0".The W3C also continues to maintain the HTML 4.01 Recommendation and the specifications for HTML 5 and XHTML 5 are being actively developed. In the current XHTML 1.0 Recommendation document, as published and revised to August 2002, the W3C comments that, "The XHTML family is the next step in the evolution of the Internet. By migrating to XHTML today, content developers can enter the XML world with all of its attendant benefits, while still remaining confident in their content's backward and future compatibility."
Motivation
In the late 1990s, many considered that the future of HTML lay in the creation of a version adhering to the syntax rules of XML. The then current version of HTML, HTML 4, was ostensibly an application of Standard Generalized Markup Language (SGML); however the specification for SGML was complex, and neither web browsers nor the HTML 4 Recommendation were fully conformant with it. By shifting the underlying base from SGML to the simpler XML, HTML would become compatible with common XML tools; servers and proxies would be able to transform content, as necessary, for constrained devices such as mobile phones.
Another key advantage was extensibility. By utilising namespaces, XHTML documents could include fragments from other XML-based languages such as Scalable Vector Graphics and MathML. Finally, the renewed work would provide an opportunity to divide HTML into reusable components (XHTML Modularization) and clean up untidy parts of the language.
Relationship to HTML
HTML is the antecedent technology to XHTML. The changes from HTML to first-generation XHTML 1.0 are minor and are mainly to achieve conformance with XML. The most important change is the requirement that the document must be well-formed and that all elements must be explicitly closed as required in XML. In XML, all element and attribute names are case-sensitive, so the XHTML approach has been to define all tag names to be lowercase.
This contrasts with some earlier established traditions that began around the time of HTML 2.0, when many used uppercase tags. In XHTML, all attribute values must be enclosed by quotes; either single (') or double (") quotes may be used. In contrast, this was sometimes optional in SGML-based HTML, where attributes can omit quotes in certain cases. All elements must also be explicitly closed, including empty (aka singleton) elements such as img and br. This can be done by adding a closing slash to the start tag, e. g., and
. Attribute minimization (e. g.,

0 comments:

  © Blogger templates Palm by Ourblogtemplates.com 2008

Back to TOP