You are here:
- Manual
- Development
- Building according to web standards
- XHTML 1.0
- What is XHTML?
Building according to web standards: What is XHTML?
XHTML (Extensible Hyper Text Markup Language) is a reformulation of HTML conform XML (Extensible Markup Language). Some people refer to XHTML as the successor of HTML. In actual fact, XHTML is not really new, as it is mainly just HTML. The way in which it is structured and processed by applications is different, however.
Compare HTML to a office building built of brick. As circumstances, use and regulations change, it is decided to demolish the building and rebuild it using glass and concrete: XHTML. It is the same building, constructed differently.
Differences between HTML and XHTML
The differences between HTML and XHTML are small. As the rules of XHTML are based on those of XML, the same exceptionally strict rules apply as with XML. The major differences are outlined below.
- XHTML documents must start with an XHTML DocType declaration.
- All Elements must be closed. Including those elements for which closing is optional according to the HTML 4.01 specifications. Elements such as
<br>and<img>, for which there is no end tag, must be closed with a/(forward slash); so<br />and<img />. - All markup must be in written in lower case (small letters).
- All attribute values must be surrounded by quotation marks (double quotes).
Links and references
- An extensive survey of the XHTML characteristics.
Three versions
As with HTML 4.01, there are three versions of XHTML 1.0: Transitional, Strict and Frameset. For explanations of these and their use, see Hyper Text Markup Language (HTML) 4.01.
XHTML 1.1
XHTML 1.1 does not have this tripartite division; the use of XHTML 1.1 for websites is, however, not recommended owning to the strict characteristics of this standard and poor by web browser support.
