XHTML 1.1

What Is XHTML 1.1?

XHTML 1.1 is the latest official (W3C-approved) version of HTML, and it was issued as a W3C Recommendation on May 31, 2001. The specification can be found at

http://www.w3.org/TR/xhtml11

XHTML 1.1 documents must have the following DOCTYPE declaration:

<!DOCTYPE 
  html PUBLIC "-//W3C/DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

The namespace for XHTML 1.1 is the XHTML namespace, which can be found here:

http://www.w3.org/1999/xhtml

Modules Comprising XHTML 1.1

XHTML 1.1 is a reformulation of XHTML 1.0 Strict in modularized XHTML. Deprecated modules were dropped entirely, and frames are not available either because they're not included in XHTML 1.0 Strict.

The modules used to create XHTML 1.1 are shown in Table 21.39.

Table 21.39. XHTML 1.1 Modules
Module Name Elements or Attributes Defined
Structure body, head, html, title
Text 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 a
List dl, dt, dd, ol, ul, li
Object object, param
Presentation b, big, hr, i, small, sub, sup, tt
Edit del, ins
Bi-Directional Text bdo
Forms button, fieldset, form, input, label, legend, select, optgroup, option, textarea
Table caption, col, colgroup, table, tbody, td, tfoot, th, thead, tr
Image img
Client-side Image Map area, map
Server-side Image Map Attribute ismap on img
Intrinsic Events Events attributes
Metainformation meta
Scripting noscript, script
Style Sheet style
Style Attribute style attribute
Link link
Base base
Ruby Annotation ruby, rbc, rtc, rb, rt, rp

Differences Between XHTML 1.0 and XHTML 1.1

For the most part, XHTML 1.1 is a faithful translation of XHTML 1.0 Strict, but there are three important differences:

  • The lang element has been removed; xml:lang should be used instead.

  • The name attribute has been removed from the a and map elements, and id is used instead.

  • The Ruby Annotation module has been added.

The Ruby Annotation Module

The Ruby Annotation module was created to meet a specific need common to East Asian languages. In those languages, ruby text is small characters that run alongside larger text to provide pronunciation or context clues as to the meaning of the larger ideographs. Use of ruby in XHTML 1.1 is not restricted to Asian languages. It can be useful to use ruby in English text in some cases.

Ruby was defined in a W3C Recommendation issued on May 31, 2001. It can be found at

http://www.w3.org/TR/ruby/

The elements and attributes defined by the Ruby Annotation module are listed in Table 21.40.

Table 21.40. Ruby Annotation Module Elements
Element Attributes Content Set Minimal Content Model
ruby Common Inline (rb,(rt|(rp,rt,rp)))
rbc Common rb+
rtc Common rt+
rb Common (PCDATA|Inline - ruby)*
rt Common, rbspan (PCDATA|Inline - ruby)*
rp Common PCDATA*

The Ruby Annotation module extends the Inline content set, as shown here, by adding the <ruby> element. The other elements are contained within the <ruby> container.

Content Set Defining Module Elements
Inline Text +ruby

The ruby Element

The ruby element is a wrapper that contains the other elements used to define a ruby. It is a signal that a ruby exists within, although it doesn't mean that only ruby text is found inside. There are two possible content models for the ruby element: simple and complex.

A simple ruby contains a single ruby base element, <rb>, with a single ruby text element, <rt>. A pair of ruby parenthesis elements, <rp>, are optional.

<ruby> 
  <rb>Ruby Base</rb>
  <rp>(</rp>
  <rt>Ruby Text</rt>
  <rp>)</rp>
</ruby>

A complex ruby contains a ruby base container element, <rbc>, and one or two ruby text containers, <rtc>. Complex ruby markup is used to associate ruby characters with specific words or ideographs.

<ruby> 
  <rbc>
    <rb>Base 1</rb>
    <rb>Base 2</rb>
    <rb>Base 3</rb>
  </rbc>
  <rtc>
    <rt>Ruby Text One</rb>
    <rt>Ruby Text Two</rt>
    <rt>Ruby Text Three</rt>
  </rtc>
  <rtc>
    <rt rbspan="3">
      All Your Base
    </rt>
  </rtc>
</ruby>
							

The rb Element

The ruby base element, <rb>, is used to identify the base text for a ruby. This is the larger text (or any inline markup) that will be annotated by the ruby. The <rb> element can appear as the first child of a <ruby> element, or as one of several children of the <rbc> element.

The rt Element

The ruby text element, <rt>, contains the text displayed in smaller letters as the ruby annotates the ruby base, <rb>.

An <rt> element can appear as the second child of the <ruby> element, or as the third child if ruby parenthesis elements, <rp>, are used. In a complex ruby, multiple <rt> elements can be used in the <rtc> container, and the <rt> element can take the rtspan attribute to indicate that it applies to multiple ruby bases.

The rp Element

Ruby parenthesis elements are used to indicate a fallback for browsers that don't yet understand ruby markup. The contents of the <rp> element are ignored by browsers that understand ruby, but those that don't will display the content inline. The <rp> element is optional. But, if it's used, it needs to be the second and fourth child of the <ruby> element—it can only be used in pairs.

The rbc Element

The <rbc> element is a container for holding ruby base elements, <rb>. Each <rb> within an <rbc> maps to one of the <rt> elements within the associated <rtc> elements. There can only be one <rbc> element within any given <ruby>.

The rtc Element

The ruby text container, <rtc>, holds <rt> elements within a complex ruby. There can be either one or two of these elements, but not more or less than that.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.165.247