XHTML: Difference between revisions
disambig. |
Itsnotvalid (talk | contribs) Added the offical validator at links, and change the linkage of tags |
||
Line 9: | Line 9: | ||
XHTML's true power is realized when used in conjunction with [[Cascading Style Sheets]]. Although HTML can be used with CSS, XHTML moves to force its use for layout and style. This makes the separation of content and form an integral part of the web page's code. |
XHTML's true power is realized when used in conjunction with [[Cascading Style Sheets]]. Although HTML can be used with CSS, XHTML moves to force its use for layout and style. This makes the separation of content and form an integral part of the web page's code. |
||
The changes from HTML, to transitional XHTML, are minor, and are mostly just in conformance with XML. The most important change is the requirement that all [[tag]]s are [[well-formed tag|well-formed]]. Additionally, in XHTML, all elements must be lowercased. This is in direct contrast to HTML 4.0, which prefers that elements are uppercased. In XHTML, all attributes, even numerical ones, must be quoted. Attribute minimization (i.e., <tt><table border></tt>) is also prohibited. More differences are detailed at the [http://www.w3.org/TR/xhtml1/#diffs W3C XHTML specification]. |
The changes from HTML, to transitional XHTML, are minor, and are mostly just in conformance with XML. The most important change is the requirement that all [[HTML tag|tag]]s are [[well-formed tag|well-formed]]. Additionally, in XHTML, all elements must be lowercased. This is in direct contrast to HTML 4.0, which prefers that elements are uppercased. In XHTML, all attributes, even numerical ones, must be quoted. Attribute minimization (i.e., <tt><table border></tt>) is also prohibited. More differences are detailed at the [http://www.w3.org/TR/xhtml1/#diffs W3C XHTML specification]. |
||
==Versions of XHTML== |
==Versions of XHTML== |
||
Line 24: | Line 24: | ||
*[http://www.w3.org/TR/xhtml11/ XHTML 1.1 Specification] |
*[http://www.w3.org/TR/xhtml11/ XHTML 1.1 Specification] |
||
*[http://www.w3.org/TR/xhtml2/ Working Draft of XHTML 2.0] |
*[http://www.w3.org/TR/xhtml2/ Working Draft of XHTML 2.0] |
||
*[http://validator.w3.org/ W3C MarkUp Validation Service (Including XHTML validation)] |
|||
*[http://validate.sf.net XHTML validator on SourceForge] |
*[http://validate.sf.net XHTML validator on SourceForge] |
||
*[http://www.wikibooks.org/wiki/Programming:XHTML Wikibooks XHTML tutorial] - in progress |
*[http://www.wikibooks.org/wiki/Programming:XHTML Wikibooks XHTML tutorial] - in progress |
Revision as of 17:23, 3 February 2004
Extensible Hypertext Markup Language (XHTML), or simply XTML, is a markup language that has the same expressive possibilites as HTML, but conforms to the XML standard which is more strict. XHTML has been recommended by the World Wide Web Consortium (W3C) since January 26, 2000.
XHTML is regarded as the next 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 other devices (like mobile devices) apart from traditional computers, where extra resources cannot be devoted to support the generosities of HTML (for example, support for both upper-case and lower-case elements). The XHTML DTD is defined within the XML DTD to enforce the strict rules of XML.
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. Although HTML can be used with CSS, XHTML moves to force its use for layout and style. This makes the separation of content and form an integral part of the web page's code.
The changes from HTML, to transitional XHTML, are minor, and are mostly just in conformance with XML. The most important change is the requirement that all tags are well-formed. Additionally, in XHTML, all elements must be lowercased. This is in direct contrast to HTML 4.0, which prefers that elements are uppercased. In XHTML, all attributes, even numerical ones, must be quoted. Attribute minimization (i.e., <table border>) is also prohibited. More differences are detailed at the W3C XHTML specification.
Versions of XHTML
- XHTML 1.0 Transitional
- Basically HTML 4.0 with XML conformance. Intended for easy migration
- XHTML 1.0 Strict
- Separates the content from layout markup
- XHTML 1.0 Frameset
- For splitting the browser window into several frames
- XHTML 1.1
- Module-based XHTML; authors can import additional features (such as framesets) into their markup
Work on XHTML 2.0 is still underway.