Validate XHTML
XHTML is the successor to HTML. As such, many consider XHTML to be the "current version" of HTML, but it is a separate, parallel standard; the W3C continues to recommend the use of either XHTML 1.1, XHTML 1.0, or HTML 4.01 for web publishing.
The need for a more strict version of HTML was felt primarily because World Wide Web content now needs to be delivered to many devices (like mobile devices) apart from traditional computers, where extra resources cannot be devoted to support the additional complexity of HTML syntax.
Most of the recent versions of popular web browsers render XHTML properly, but many older browsers can only render XHTML as HTML. Similarly, almost all web browsers that are compatible with XHTML also render HTML properly. Some argue this compatibility is slowing the switch from HTML to XHTML. During October 2005 approximately 10% of web surfers were using browsers capable of rendering XHTML properly. True to form, Microsoft's MSIE is incompatible with modern standards, despite Microsoft's full membership in the W3C. Therefore, most web content authors are forced to choose between writing valid, standards-compliant documents and providing content that renders properly on the browsers of most human visitors.
An especially useful feature of XHTML is that elements from different XML namespaces (such as MathML and Scalable Vector Graphics) can be incorporated within it. However, this feature is only available when serving XHTML as actual XML with the application/xhtml+xml MIME-type.
The changes from HTML to first-generation XHTML (i.e. XHTML 1.x) 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. Since XML's tags are case-sensitive, the XHTML standard has defined all tag names to be lowercase. This is in direct contrast to established traditions which began around the time of HTML 2.0, when most people preferred uppercase tags, generally to show the contrast between mark-up and context easier to the human editor. In XHTML, all attribute values must be enclosed by quotes (either 'single' or "double" quotes may be used). In contrast, this was optional in SGML, and hence in HTML, where quotes may be omitted in some circumstances. All elements must also be explicitly closed, including empty elements such as img and br. This can be done by adding a closing slash to the start tag: <img … /> and <br />. Attribute minimization (e.g., <option selected>) is also prohibited as the attribute "selected" contains no explicit value; instead, use <option selected="selected">. More differences are detailed in the W3C XHTML specification.
- From Wikipedia, the free encyclopedia
This is the W3C Markup Validation Service, a free service that checks Web documents in formats like HTML and XHTML for conformance to W3C Recommendations and other standards.
|