XHTML - Version 1.1
The W3C has helped move the internet content-development community from the days of malformed, non-standard mark-up into the well-formed, valid world of XML. With XHTML 1.0, this transition was moderated by the goal of offering quick conversion of current HTML 4 (or earlier) related content to XHTML and XML.
The W3C also withdrawn support for obsolete elements and attributes from the XHTML set. These elements and attributes had largely presentation-oriented functionality that is better handled via style sheets or client-specific default behavior.
Now the W3C 's HTML Working Group has defined an initial document type based solely upon modules which are XHTML 1.1. This document type is built to be accessible to a wide range of client devices, and relevant to the majority of internet content.
The XHTML 1.1 includes descriptions of strictly conforming XHTML documents and MUST satisfy all the following requirements −
- The document Will adhere to the constraints specified in XHTML 1.1 Document Type Specification.
- The root element of the document MUST be <html>.
- The root element of the document Will assign the XHTML namespace using the xmlns attribute.
- The root element Can also contain a schema position attribute as specified in the XML Schema.
There Has to be a DOCTYPE declaration in the document prior to the root element. If it is available, the public identifier included in the DOCTYPE declaration MUST relate the DTD discovered in XHTML 1.1 Document Type Definition.
Here is an example of an XHTML 1.1 document −
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<title>write your document title</title>
<p>Moved to <a href="http://one.org/">one.org</a>.</p>
Note − In this case, the XML declaration is included. An XML declaration such as the one above is not needed in all XML documents. XHTML document writers are actively advised to use XML definitions in all their documents. Such a declaration is needed where the character encoding of the text is other than the usual UTF-8 or UTF-16.
XHTML 1.1 Modules
The XHTML 1.1 document type is made up of the following XHTML modules.
- Structure Module − The Structure Module defines the major structural elements for XHTML. These components essentially serve as a basis for the content model of many XHTML family document types. The elements and attributes included in this module are − body, head, html, and title.
- Text Module − This framework specifies all of the common text container features, attributes, and their content model − abbr, acronym, address, blockquote, br, cite, tag, dfn, div, em, h1, h2, h3, h4, h5, h6, kbd, p, pre, q, samp, span, solid, and var.
- Hypertext Module − The Hypertext Module includes the feature that is used to identify hypertext links to certain services. This module supports element a.
- List Module − As its name implies, the List Module includes list-oriented features. Specifically, the List Module provides the following elements and attributes − dl, dt, dd, ol, ul, and li.
- Object Module − The Object to provide elements for general-purpose object inclusion. Specifically, the Object Module supports − object and param.
- Presentation Module − This module defines components, attributes, and a simplified layout model for basic presentation-related markup − b, big, hr, I small, sub, sup, and tt.
- Edit Framework − This package describes items and attributes for use in editing-related markup − del and ins.
- Forms Module − It includes all the form functionality contained in HTML 4.0. Specifically, it supports − button, fieldset, form, input, label, legend, select, optgroup, option, and textarea.
- Table Module − It supports the following components, attributes, and material model − caption, col, colgroup, table, tbody, td, tfoot, th, thead, and tr.
- Image Module − It provides basic image embedding and may be used in some implementations of client side image maps independently. It supports the element − img.
- Client-side Image Map Module − It includes elements for client side image maps − field and region.
- Server-side Image Map Module − This offers support for image-finding and transmission of location coordinates.
- Link Module − It specifies an aspect that can be used to identify connections to external resources. It supports link element.
- Base Module − It specifies an element that can be used to identify a base URI to which relative URIs in the document are resolved. The feature and attribute used in this module is − basis.
Changes from XHTML 1.0 Strict
This section highlights the differences between XHTML 1.1 and XHTML 1.0 Strict. XHTML 1.1 means moving away from both HTML 4 and XHTML 1.0.
- The most notable is the removed of functionality that were discontinued.
- The changes can be summarized as follows −
- On every element, the lang attribute has been removed in favor of the xml: lang attribute.
- On the <a> and <map> elements, the name attribute has been erased in favor of the I d attribute.