Semantic XHTML: Difference between revisions
Jump to navigation
Jump to search
m (using an external editor) |
mNo edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Definition == | == Definition == | ||
* {{quotation | XHTML is built on XML, and thus XHTML-based formats can be used not only for convenient display presentation, but also for general-purpose data exchange. In many ways, XHTML-based formats exemplify the best of both HTML and XML worlds. However, when building XHTML-based formats, it helps to have a guiding set of principles.}} ([http://microformats.org/wiki/SemanticXHTMLDesignPrinciples Semantic XHTML Design Principles], retrieved 15: | * {{quotation | XHTML is built on XML, and thus XHTML-based formats can be used not only for convenient display presentation, but also for general-purpose data exchange. In many ways, XHTML-based formats exemplify the best of both HTML and XML worlds. However, when building XHTML-based formats, it helps to have a guiding set of principles.}} ([http://microformats.org/wiki/SemanticXHTMLDesignPrinciples Semantic XHTML Design Principles], retrieved 15:46, 12 April 2007 (MEST)) | ||
See also: [[Microformat]]s (for a global perspective) and [[semantic web]] for an opposite, more heavy approach. | See also: [[Microformat]]s (for a global perspective) and [[semantic web]] for an opposite, more heavy approach. | ||
Line 17: | Line 17: | ||
=== Simple example === | === Simple example === | ||
Source: [http://www.tantek.com/presentations/2004etech/realworldsemanticspres.html Real world semantics], retrieved 15: | Source: [http://www.tantek.com/presentations/2004etech/realworldsemanticspres.html Real world semantics], retrieved 15:46, 12 April 2007 (MEST). | ||
<table border="1"> | <table border="1"> | ||
<tr><th>presentational</th> <th>semantic</th></tr> | <tr><th>presentational</th> <th>semantic</th></tr> | ||
<tr><td | <tr><td><br></td> <td><p></td></tr> | ||
<tr><td | <tr><td><font></td> <td><h1>,<h2>,<h3></td></tr> | ||
<tr><td | <tr><td><i>,<b></td> <td><em>,<strong></td></tr> | ||
</table> | </table> | ||
== Links == | |||
; Web sites | |||
* [http://microformats.org/wiki/microformats Microformats Wiki] (best resource) | * [http://microformats.org/wiki/microformats Microformats Wiki] (best resource) | ||
* [http://microformats.org/ Microformats] blog | |||
; Talks and web pages | |||
* [http://microformats.org/about/ About microformats] | |||
* [http://www.whump.com/moreLikeThis/link/04069 Lossless XHTML] (blog entry by Bill Humphries) | * [http://www.whump.com/moreLikeThis/link/04069 Lossless XHTML] (blog entry by Bill Humphries) | ||
Line 38: | Line 45: | ||
[[Category: Standards]] | [[Category: Standards]] | ||
[[Category: XML]] | [[Category: XML]] |
Latest revision as of 19:00, 8 July 2009
Definition
- “XHTML is built on XML, and thus XHTML-based formats can be used not only for convenient display presentation, but also for general-purpose data exchange. In many ways, XHTML-based formats exemplify the best of both HTML and XML worlds. However, when building XHTML-based formats, it helps to have a guiding set of principles.” (Semantic XHTML Design Principles, retrieved 15:46, 12 April 2007 (MEST))
See also: Microformats (for a global perspective) and semantic web for an opposite, more heavy approach.
Design Principles
According to Semantic XHTML Design Principles, the design principles (reproduced in simplified form here) are:
- Reuse schema (names, objects, properties, values, types, hierarchies, constraints) as much as possiblefrom pre-existing, established, well-supported standards by reference. (and don't restate constraints expressed in the source standard, informative mentions are ok).
- Use the most accurately precise semantic XHTML building block for each object. E.g. use the "address" tag for a contact information, "h2" for a section title.
- Otherwise use a generic structural element (e.g. span or div), or the appropriate contextual element (e.g. an li inside a ul or ol).
- Base class names on the original schema.
Microformats use semantic XHTML, but not all uses of semantic XHTML are microformats.
Simple example
Source: Real world semantics, retrieved 15:46, 12 April 2007 (MEST).
presentational | semantic |
---|---|
<br> | <p> |
<font> | <h1>,<h2>,<h3> |
<i>,<b> | <em>,<strong> |
Links
- Web sites
- Microformats Wiki (best resource)
- Microformats blog
- Talks and web pages
- Lossless XHTML (blog entry by Bill Humphries)
- The Elements of Meaningful XHTML. Slides by Tantek Çelik, Chief Technologist Technorati
- Real world semantics by Tantek çelik and Kevin Mar, slides 2004