![]() |
|
|
| |
|
||||
XHTML (short for Extensible Hypertext Markup Language) is a markup language that has the same expressive possibilities as HTML, but a stricter syntax. Whereas HTML was an application of SGML, a very flexible markup language, XHTML is an application of XML, a more restrictive subset of SGML. XHTML 1.0 became a World Wide Web Consortium (W3C) Recommendation on January 26, 2000.
OverviewMissing image W3C_valid_XHTML_1.0_icon.png The W3C offers this icon, which may be placed on valid XHTML documents once they pass through the W3C Markup Validator (http://validator.w3.org/). XHTML is the successor to, and the current version of, HTML. The need for a more strict version of HTML was felt primarily as now web content needs to be delivered to many devices (like mobile devices) apart from traditional computers, where extra resources cannot be devoted to support the generosities of HTML. (The looser the syntax of a language, the harder it is to process.) A DTD defines the rules of XHTML, against which documents can be checked. Most of the recent versions of popular web browsers render XHTML properly, and many older browsers will also render XHTML as it is mostly a subset of HTML and most browsers do not require valid HTML. Similarly, almost all web browsers that are compatible with XHTML also render HTML properly. Some say this is slowing the switch from HTML to XHTML. XHTML's true power is realized when used in conjunction with Cascading Style Sheets; this makes the separation of style and content an integral part of the web page's code and with mixing different XML applications (such as MathML or SVG) in a single document The changes from HTML to transitional XHTML are minor, and are mainly to increase conformance with XML. The most important change is the requirement that all tags be well formed and semantically rich. Additionally, in XHTML, all tags must be written in lowercase. This is in direct contrast to established traditions which began around the time of HTML 2.0, when most people preferred uppercase tags. In XHTML, all attributes, even numerical ones, must be quoted. (This is not mandatory in SGML (hence in HTML), where quotes are not required if the content consists only of alphanumeric and certain allowed special characters.) All elements must also be closed, including empty elements such as Versions of XHTMLXHTML 1.1The most recent XHTML W3C Recommendation is XHTML 1.1: Module-based XHTML. Authors can import additional features (such as framesets) into their markup. This version also allows for ruby markup support, needed for Far-Eastern languages. This is the specification that the W3C recommends all new web pages be created in. XHTML 1.0The original XHTML W3C Recommendation, XHTML 1.0, was simply a reformulation of HTML 4.01 in XML. There are three different 'flavours' of XHTML 1.0, each equal in scope to their respective HTML 4.01 versions.
The XHTML 2.0 draft specificationWork on XHTML 2.0 is, as of 2004, still underway; in fact, the DTD has not even been authored yet. The XHTML 2.0 draft is controversial because it breaks backwards compatibility with all previous versions, and is therefore in effect a new markup language created to circumvent (X)HTML's limitations rather than being simply a new version. New features brought into the HTML family of markup languages by XHTML 2.0 state that:
Others in the XHTML family
Validating XHTML documentsAn XHTML document that conforms to the XHTML specification is said to be a valid document. In a perfect world, all browsers would follow the web standards and valid documents would predictably render on every browser and platform. Although validating your XHTML does not ensure cross-browser compatibility, it is recommended. A document can be checked for validity with the W3C Markup Validation Service (http://validator.w3.org/). DOCTYPEsFor a document to validate, it must contain a Document Type Declaration, or DOCTYPE. A DOCTYPE declares to the browser what Document Type Definition (DTD) the document conforms to. A DTD should be placed at the very beginning of an XHTML document. These are the most common XHTML DTDs:
A character encoding must also be specified at the beginning of an XHTML document. Once an XHTML document has a DOCTYPE and character encoding specified, it can be run through a validator (such as the W3C Markup Validation Service) to see if it meets the standard. Validation will locate and describe errors in XHTML markup. When a page is validated using the W3C Markup Validation Service, the W3C returns a small icon that you may place on your document to show that it conforms to web standards. The W3C also offers validation for CSS. Common errorsSome of the most common errors in XHTML are:
This is not an exhaustive list, but gives a general sense of errors that XHTML coders often make. See alsoExternal links
Validators
ca:XHTML de:Extensible Hypertext Markup Language es:XHTML eo:XHTML fr:XHTML ia:XHTML it:XHTML lv:XHTML nl:XHTML ja:XHTML pl:XHTML ru:XHTML fi:XHTML sv:XHTML |
||
|
|
|
|
|
|
Copyright 2008 WordIQ.com - Privacy Policy
::
Terms of Use
:: Contact Us
:: About Us This article is licensed under the GNU Free Documentation License. It uses material from the Wikipedia article "". |