Overview
XHTML is "a reformulation of the three HTML 4 document types as applications of XML 1.0".[1] The W3C also continues to maintain the HTML 4.01 Recommendation and the specifications for HTML5 and XHTML5 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
According to the W3C XHTML 1.0 recommendation document,[2] with which the standards body introduced XHTML to the web community in January 2000, HTML had originally been designed for authoring relatively simple, technical documents. It quickly outgrew this original purpose, leading to the rapid invention of new elements and adaptations to specialized uses, which in turn led to interoperability problems on different platforms.
XML, as a restricted subset of SGML, preserves most of SGML's power but removes much of its complexity. In doing so, it reduces both the costs and the complexity of producing suitable authoring software.
XHTML combines the benefits of XML with those of HTML. For example, to express ideas using new markup, the XHTML family accommodates extensions as described in the XHTML Modularization specification. XHTML also maximizes interoperability: servers, proxies, and user agents can transform content into whatever format is most appropriate for various requesting agents, such as mobile users with limited capabilities, robotic agents that are mainly interested in indexable text, or home users who wish to make the most of broadband or interactive multimedia.
In 2000, the W3C concluded 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.
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.[3] 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 which 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 numeric or boolean attributes can omit quotes.[citation needed] 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., ) is also prohibited, as the attribute selected contains no explicit value; instead this would be written as .
HTML elements which are optional in the content model will not appear in the DOM tree unless they are explicitly specified. For example, an XHTML page must have a element, and a table will not have a element unless the author specifies one.
The XHTML 1.0 recommendation devotes a section to differences between HTML and XHTML.[4]. The WHATWG wiki similarly considers differences that arise with the use of (X)HTML5.
Because XHTML and HTML are closely related technologies, sometimes they are written about and documented in parallel. In such circumstances, some authors conflate the two names by using a parenthetical notation, such as (X)HTML. This indicates that the documentation and principles can be considered to apply generally to both standards.
Adoption
The similarities between HTML 4.01 and XHTML 1.0 led many web sites and content management systems to adopt the initial W3C XHTML 1.0 Recommendation. To aid authors in the transition, the W3C provided guidance on how to publish XHTML 1.0 documents in an HTML-compatible manner, and serve them to browsers that were not designed for XHTML.[7]
Such "HTML-compatible" content is sent using the HTML media type (text/html) rather than the official Internet media type for XHTML (application/xhtml+xml). When measuring the adoption of XHTML to that of regular HTML, therefore, it is important to distinguish whether it is media type usage or actual document contents that is being compared.
Most web browsers have mature support[9] for all of the possible XHTML media types.[10] The notable exception is Internet Explorer by Microsoft; rather than rendering application/xhtml+xml content, a dialog box invites the user to save the content to disk instead. Both Internet Explorer 7 (released in 2006) and the second beta version of Internet Explorer 8 (released in August 2008) exhibit this behavior, and it is unclear whether this will be resolved in a future release. As long as this remains the case, most web developers avoid using XHTML that isn’t HTML-compatible[11], so advantages of XML such as namespaces, faster parsing and smaller-footprint browsers do not benefit the user. Microsoft developer Chris Wilson explained in 2005 that IE7’s priorities were improved security and CSS support, and that proper XHTML support would be difficult to graft onto IE’s compatibility-oriented HTML parser.
In the early 2000s, some web developers began to question why Web authors ever made the leap into authoring in XHTML.[13][14][15] Others countered that the problems ascribed to the use of XHTML could mostly be attributed to two main sources: the production of invalid XHTML documents by some Web authors and the lack of support for XHTML built into IE6.[16][17] They went on to describe the benefits of XML-based Web documents (i.e. XHTML) regarding searching, indexing and parsing as well as future-proofing the Web itself.
In October 2006, HTML inventor and W3C chair Tim Berners-Lee, introducing a major W3C effort to develop new XHTML 5 and HTML 5 specifications, posted in his blog that, "The attempt to get the world to switch to XML ... all at once didn't work. The large HTML-generating public did not move ... Some large communities did shift and are enjoying the fruits of well-formed systems ... The plan is to charter a completely new HTML group."[18] In the current HTML and XHTML 5 working draft, its authors say that, "special attention has been given to defining clear conformance criteria for user agents in an effort to improve interoperability", "...while at the same time updating the HTML specifications to address issues raised in the past few years." Ian Hickson, author of the important paper criticising the use of XHTML in 2002, is a member of the group developing this specification and is listed as one of the co-authors of the current working draft.
Web Management India
Web Solution Tools.
Mrf Web Design
Mrf Web Development
Mrf Web Development
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment