| • Science | • People | • Locations | • Timeline |
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 device s) 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.
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 tagThis article is about HTML elements. For information on how to format Wikipedia entries, see How to edit a page and In computing, an HTML element (instance) in terms of SGML is the complete sequence of a start tag (with attributes and their values), any es be well-formedIn web page design, a well-formed tag is one that is either #opened and closed, #an empty element, which still must be terminated, and is properly nested and does not overlap. For example, in HTML: word is a well-formed tag, while word is not, since the b. 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 img and br. This can be done by adding a closing slash to the start tag: and . Attribute minimization (e.g., ) is also prohibited. More differences are detailed at the W3C XHTML specification.
XHTML is HTML reformulated as XML. There are three different versions, equal in scope to their respective HTML4.0 versions.
Work on XHTML 2.0 is, as of 2004, still underway. 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 inspired by [X]HTML rather than a true successor of it.