XHTML
XHTML is a markup language that has the same depth of expression as HTML but includes the construction rules of XML. As of version 1.1 it is broken into modules that each define a portion of the language. It also defines MHTML for email (eml) files.
Contents |
[edit] It is HTML
The tags for XHTML are really the same tags that are used in HTML. However many optional features that browsers allow are not allowed in XHTML. For example in HTML you can start a paragraph with <p> and never bother to close it. When the Web Browser sees another tag it will close the paragraph automatically. In XHTML the closing </p> is required. Like the XML that it is derived from all tags are lower case.
If a tag is fully defined by itself there must be a special close to tell HTML about it. For example a <br> in HTML would be coded as <br /> with the / indicating that this tag is fully defined without any further data.
In addition some of the HTML tags have been deprecated in favor of a CSS implementation. For example the <center> tag.
A program like Htmltidy can fix some of the problems caused by the more stringent requirements and identify others for the user to fix.
Like HTML it supports the full list of HTML entities as defined in Entity reference and includes the apos from XML.
[edit] XHTML basic
This is a standard implementation defined as a W3C specification. It is the minimal set of tags that must be supported to allow the format to be defined as legal XHTML. It is defined for Web clients such as mobile phones, PDAs, pagers, and set top boxes. The document type is rich enough for content authoring.
The style element is not supported but external style sheets are encouraged following CSS rules. The link element can be used to include external style sheets. The div and span elements and the class attribute are supported to hook style information onto the structure. The script and noscript elements are not supported. Usually small devices have limited memory and CPU power. Execution of script programs may not be supported. Contents should be readable even if scripts are not executed.
Tables are supported but not nested tables. Authors should follow the Web content accessibility guidelines to allow tables to be used on small screens. Images are supported.
XHTML Basic consists of the following XHTML modules:
- Structure Module: body, head, html, title
- Text Module: abbr, acronym, address, blockquote, br, cite, code, dfn, div, em, h1, h2, h3, h4, h5, h6, kbd, p, pre, q, samp, span, strong, var
- Hypertext Module: a
- List Module: dl, dt, dd, ol, ul, li
- Basic Forms Module: form, input, label, select, option, textarea
- Basic Tables Module: caption, table, td, th, tr
- Image Module: img
- Object Module: object, param
- Metainformation Module: meta
- Link Module: link
- Base Module: base
- Comments: <!-- comments will be ignore between these symbols. -->
[edit] ePUB
ePUB is a eBook reading format that uses XHTML as its basic text format. In particular the section ePUB XHTML describes the portion of XHTML standard keywords that ePUB uses.
[edit] Definition
The overall definition is provided in the code below: (Follow the links in the code for module definitions. View the source for this page for copyright data.)
<!ENTITY % XHTML.version "-//W3C//DTD XHTML 1.1//EN" > <!ENTITY % NS.prefixed "IGNORE" > <!ENTITY % XHTML.prefix "xhtml" > <!ENTITY % XHTML.global.attrs.prefixed "INCLUDE" > <!ENTITY % XLINK.xmlns "" > <!ENTITY % XLINK.xmlns.attrib "" > <!ENTITY % XHTML.profile "" > <!ENTITY % xhtml-notations.module "IGNORE" > <!ENTITY % XHTML.bidi "INCLUDE" > <?doc type="doctype" role="title" { XHTML 1.1 } ?> <!ENTITY % xhtml-prefw-redecl.module "IGNORE" > <![%xhtml-prefw-redecl.module;[ %xhtml-prefw-redecl.mod; ]]> <!ENTITY % xhtml-events.module "INCLUDE" > <!ENTITY % xhtml-inlstyle.module "INCLUDE" > <![%xhtml-inlstyle.module;[ <!ENTITY % xhtml-inlstyle.mod PUBLIC "-//W3C//ELEMENTS XHTML Inline Style 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-inlstyle-1.mod" > %xhtml-inlstyle.mod;]]> <!ENTITY % xhtml-model.mod PUBLIC "-//W3C//ENTITIES XHTML 1.1 Document Model 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml11-model-1.mod" > <!ENTITY % xhtml-framework.module "INCLUDE" > <![%xhtml-framework.module;[ <!ENTITY % xhtml-framework.mod PUBLIC "-//W3C//ENTITIES XHTML Modular Framework 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-framework-1.mod" > %xhtml-framework.mod;]]> <!ENTITY % xhtml-postfw-redecl.module "IGNORE" > <![%xhtml-postfw-redecl.module;[ %xhtml-postfw-redecl.mod; ]]> <!ENTITY % xhtml-text.module "INCLUDE" > <![%xhtml-text.module;[ <!ENTITY % xhtml-text.mod PUBLIC "-//W3C//ELEMENTS XHTML Text 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-text-1.mod" > %xhtml-text.mod;]]> <!ENTITY % xhtml-hypertext.module "INCLUDE" > <![%xhtml-hypertext.module;[ <!ENTITY % xhtml-hypertext.mod PUBLIC "-//W3C//ELEMENTS XHTML Hypertext 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-hypertext-1.mod" > %xhtml-hypertext.mod;]]> <!ENTITY % xhtml-list.module "INCLUDE" > <![%xhtml-list.module;[ <!ENTITY % xhtml-list.mod PUBLIC "-//W3C//ELEMENTS XHTML Lists 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-list-1.mod" > %xhtml-list.mod;]]> <!ENTITY % xhtml-edit.module "INCLUDE" > <![%xhtml-edit.module;[ <!ENTITY % xhtml-edit.mod PUBLIC "-//W3C//ELEMENTS XHTML Editing Elements 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-edit-1.mod" > %xhtml-edit.mod;]]> <!ENTITY % xhtml-bdo.module "%XHTML.bidi;" > <![%xhtml-bdo.module;[ <!ENTITY % xhtml-bdo.mod PUBLIC "-//W3C//ELEMENTS XHTML BIDI Override Element 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-bdo-1.mod" > %xhtml-bdo.mod;]]> <!ENTITY % Ruby.common.attlists "INCLUDE" > <!ENTITY % Ruby.common.attrib "%Common.attrib;" > <!ENTITY % xhtml-ruby.module "INCLUDE" > <![%xhtml-ruby.module;[ <!ENTITY % xhtml-ruby.mod PUBLIC "-//W3C//ELEMENTS XHTML Ruby 1.0//EN" "http://www.w3.org/TR/ruby/xhtml-ruby-1.mod" > %xhtml-ruby.mod;]]> <!ENTITY % xhtml-pres.module "INCLUDE" > <![%xhtml-pres.module;[ <!ENTITY % xhtml-pres.mod PUBLIC "-//W3C//ELEMENTS XHTML Presentation 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-pres-1.mod" > %xhtml-pres.mod;]]> <!ENTITY % xhtml-link.module "INCLUDE" > <![%xhtml-link.module;[ <!ENTITY % xhtml-link.mod PUBLIC "-//W3C//ELEMENTS XHTML Link Element 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-link-1.mod" > %xhtml-link.mod;]]> <!ENTITY % xhtml-meta.module "INCLUDE" > <![%xhtml-meta.module;[ <!ENTITY % xhtml-meta.mod PUBLIC "-//W3C//ELEMENTS XHTML Metainformation 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-meta-1.mod" > %xhtml-meta.mod;]]> <!ENTITY % xhtml-base.module "INCLUDE" > <![%xhtml-base.module;[ <!ENTITY % xhtml-base.mod PUBLIC "-//W3C//ELEMENTS XHTML Base Element 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-base-1.mod" > %xhtml-base.mod;]]> <!ENTITY % xhtml-script.module "INCLUDE" > <![%xhtml-script.module;[ <!ENTITY % xhtml-script.mod PUBLIC "-//W3C//ELEMENTS XHTML Scripting 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-script-1.mod" > %xhtml-script.mod;]]> <!ENTITY % xhtml-style.module "INCLUDE" > <![%xhtml-style.module;[ <!ENTITY % xhtml-style.mod PUBLIC "-//W3C//ELEMENTS XHTML Style Sheets 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-style-1.mod" > %xhtml-style.mod;]]> <!ENTITY % xhtml-image.module "INCLUDE" > <![%xhtml-image.module;[ <!ENTITY % xhtml-image.mod PUBLIC "-//W3C//ELEMENTS XHTML Images 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-image-1.mod" > %xhtml-image.mod;]]> <!ENTITY % xhtml-csismap.module "INCLUDE" > <![%xhtml-csismap.module;[ <!ENTITY % xhtml-csismap.mod PUBLIC "-//W3C//ELEMENTS XHTML Client-side Image Maps 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-csismap-1.mod" > %xhtml-csismap.mod;]]> <!ENTITY % xhtml-ssismap.module "INCLUDE" > <![%xhtml-ssismap.module;[ <!ENTITY % xhtml-ssismap.mod PUBLIC "-//W3C//ELEMENTS XHTML Server-side Image Maps 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-ssismap-1.mod" > %xhtml-ssismap.mod;]]> <!ENTITY % xhtml-param.module "INCLUDE" > <![%xhtml-param.module;[ <!ENTITY % xhtml-param.mod PUBLIC "-//W3C//ELEMENTS XHTML Param Element 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-param-1.mod" > %xhtml-param.mod;]]> <!ENTITY % xhtml-object.module "INCLUDE" > <![%xhtml-object.module;[ <!ENTITY % xhtml-object.mod PUBLIC "-//W3C//ELEMENTS XHTML Embedded Object 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-object-1.mod" > %xhtml-object.mod;]]> <!ENTITY % xhtml-table.module "INCLUDE" > <![%xhtml-table.module;[ <!ENTITY % xhtml-table.mod PUBLIC "-//W3C//ELEMENTS XHTML Tables 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-table-1.mod" > %xhtml-table.mod;]]> <!ENTITY % xhtml-form.module "INCLUDE" > <![%xhtml-form.module;[ <!ENTITY % xhtml-form.mod PUBLIC "-//W3C//ELEMENTS XHTML Forms 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-form-1.mod" > %xhtml-form.mod;]]> <!ENTITY % xhtml-target.module "INCLUDE" > <![%xhtml-target.module;[ <!ENTITY % xhtml-target.mod PUBLIC "-//W3C//ELEMENTS XHTML Target 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-target-1.mod" > %xhtml-target.mod;]]> <!ENTITY % xhtml-legacy.module "IGNORE" > <![%xhtml-legacy.module;[ <!ENTITY % xhtml-legacy.mod PUBLIC "-//W3C//ELEMENTS XHTML Legacy Markup 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-legacy-1.mod" > %xhtml-legacy.mod;]]> <!ENTITY % xhtml-struct.module "INCLUDE" > <![%xhtml-struct.module;[ <!ENTITY % xhtml-struct.mod PUBLIC "-//W3C//ELEMENTS XHTML Document Structure 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-struct-1.mod" > %xhtml-struct.mod;]]>
[edit] For more information
http://www.w3.org/TR/2009/NOTE-xhtml-media-types-20090116/ - Covers guidelines from creating web documents in XHTML and by extension ePUB documents.