Copyright © tutorialspoint.com
The W3C has helped move the Internet content-development community from the days of malformed, non-standard markup into the well formed, valid world of XML. In XHTML 1.0, this move was moderated by a goal of providing for easy migration of existing, HTML 4 (or earlier) based content to XHTML and XML.
The W3C has removed support for deprecated elements and attributes from the XHTML family. These elements and attributes were 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 will be XHTML 1.1. This document type is designed to be portable to a broad collection of client devices, and applicable to the majority of Internet content.
The XHTML 1.1 provides a definition of strictly conforming XHTML documents which MUST meet all the following criteria:
The document MUST conform to the constraints expressed in XHTML 1.1 Document Type Definition.
The root element of the document MUST be <html>.
The root element of the document MUST designate the XHTML namespace using the xmlns attribute.
The root element MAY also contain an schema Location attribute as defined in the XML Schema.
There MUST be a DOCTYPE declaration in the document prior to the root element. If present, the public identifier included in the DOCTYPE declaration MUST reference the DTD found 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" xsi:schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd" xml:lang="en" > <head> <title>This is the document title</title> </head> <body> <p>Moved to <a href="http://example.org/">example.org</a>.</p> </body> </html>
NOTE: Note that in this example, the XML declaration is included. An XML declaration like the one above is not required in all XML documents. XHTML document authors are strongly encouraged to use XML declarations in all their documents. Such a declaration is required when the character encoding of the document is other than the default UTF-8 or UTF-16.
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 elements effectively act as the basis for the content model of many XHTML family document types. The elements and attributes included in this module are:body, head, html, title.
Text Module: This module defines all of the basic text container elements, attributes, and their content model: 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: The Hypertext Module provides the element that is used to define hypertext links to other resources. This module supports a element.
List Module: As its name suggests, the List Module provides list-oriented elements. Specifically, the List Module supports the following elements and attributes: dl, dt, dd, ol, ul, li.
Object Module: The Object Module provides elements for general-purpose object inclusion. Specifically, the Object Module supports: object, param.
Presentation Module: This module defines elements, attributes, and a minimal content model for simple presentation-related markup:b, big, hr, i, small, sub, sup, tt.
Edit Module: This module defines elements and attributes for use in editing-related markup: del, ins.
Bidirectional Text Module: The Bi-directional Text module defines an element that can be used to declare the bi-directional rules for the element's content. bdo.
Forms Module: The Forms Module provides all of the forms features found in HTML 4.0. Specifically, the Forms Module supports: button, fieldset, form, input, label, legend, select, optgroup, option, textarea.
Table Module: Tables Module supports the following elements, attributes, and content model:caption, col, colgroup, table, tbody, td, tfoot, th, thead, tr.
Image Module: The Image Module provides basic image embedding, and may be used in some implementations independently of client side image maps. The Image Module supports the following element and attributes: img.
Client-side Image Map Module: The Client-side Image Map Module provides elements for client side image maps: area, map.
Server-side Image Map Module: The Server-side Image Map Module provides support for image-selection and transmission of selection coordinates.The Server-side Image Map Module supports: attribute ismap on img.
Intrinsic Events Module: It supports all the events discussed in XHTML Events.
Metainformation Module: The Metainformation Module defines an element that describes information within the declarative portion of a document. This module includes meta element.
Scripting Module: The Scripting Module defines elements that are used to contain information pertaining to executable scripts or the lack of support for executable scripts. Elements and attributes included in this module are: noscript, script
Style Sheet Module: The Style Sheet Module defines an element to be used when declaring internal style sheets. The element and attributes defined by this module are:style
Style Attribute Module: Deprecated - The Style Attribute Module defines the style attribute.
Link Module: The Link Module defines an element that can be used to define links to external resources. This supports link element.
Base Module: The Base Module defines an element that can be used to define a base URI against which relative URIs in the document will be resolved. The element and attribute included in this module are: base.
Ruby Annotation Module: XHTML also uses the Ruby Annotation module as defined in RUBY and supports: ruby, rbc, rtc, rb, rt, rp
This section describes the differences between XHTML 1.1 and XHTML 1.0 Strict. XHTML 1.1 represents a departure from both HTML 4 and XHTML 1.0.
The most significant is the removal of features that were deprecated.
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 removed in favor of the id attribute.
The ruby collection of elements has been added.
Copyright © tutorialspoint.com