Table of Contents Categories
  • Standards
  • XML
  •   Encyclosphere.org ENCYCLOREADER
      supported by EncyclosphereKSF

    Semantic XHTML

    From Edutechwiki - Reading time: 2 min

    Definition[edit | edit source]

    • “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[edit | edit source]

    According to Semantic XHTML Design Principles, the design principles (reproduced in simplified form here) are:

    1. 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).
    2. 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.
    3. 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).
    4. Base class names on the original schema.

    Microformats use semantic XHTML, but not all uses of semantic XHTML are microformats.

    Simple example[edit | edit source]

    Source: Real world semantics, retrieved 15:46, 12 April 2007 (MEST).

    presentational semantic
    <br> <p>
    <font> <h1>,<h2>,<h3>
    <i>,<b> <em>,<strong>

    Links[edit | edit source]

    Web sites
    Talks and web pages
    This article is licensed under CC BY-SA 3.0.
    Original source: https://edutechwiki.unige.ch/en/Semantic XHTML
    Status: article is cached
    Encyclosphere.org EncycloReader is supported by the EncyclosphereKSF