Contents
This section is normative.
Many of the abstract modules in this document define the required attributes for their elements. The table below defines some collections of attributes that are referenced throughout the modules. These expressions should in no way be considered normative or mandatory. They are an editorial convenience for this document. When used in the remainder of this section, it is the expansion of the term that is normative, not the term itself.
The following basic attribute sets are used on many elements. In each case where they are used, their use is identified via their collection name.
The class attribute can be used for different purposes in XHTML, for instance as a style sheet selector (when an author wishes to assign style information to a set of elements), and for general purpose processing by user agents.
For instance in the following example, the p element is used in conjunction with the class attribute to identify a particular type of paragraph.
<p><span class="note"> These programs are only available if you have purchased the advanced professional suite. </p>
Style sheets rules can then be used to render the paragraph appropriately, for instance by putting a border round it, giving it a different background colour, or where necessary by not displaying it at all.
The id attribute has several roles in XHTML:
As an example, the following headings are distinguished by their id values:
<h id="introduction">Introduction</h> <p>...</p> <h id="events">The Events Module</h> <p>...</p>
Values of the title attribute may be rendered by user agents in a variety of ways. For instance, visual browsers should display the title as a "tool tip" (a short message that appears when the pointing device pauses over an object). Audio user agents may speak the title information in a similar context.
The title attribute has an additional role when used with the link element to designate an external style sheet. Please consult the section on links and style sheets for details.
Example:
<a href="/Jakob/" title="Author biography">Jakob Nielsen</a>'s Alertbox for January 11, 1998
An element inherits language code information according to the following order of precedence (highest to lowest):
In this example, the primary language of the document is French ("fr"). One paragraph is declared to be in US English ("en-us"), after which the primary language returns to French. The following paragraph includes an embedded Japanese ("ja") phrase, after which the primary language returns to French.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 2.0//EN" "http://www.w3.org/xhtml2/DTD/xhtml2.dtd"> <html xmlns="http://www.w3.org/2002/06/xhtml2" xml:lang="fr"> <head> <title>Un document multilingue</title> </head> <body> <p>...Interpreted as French...</p> <p xml:lang="en-us">...Interpreted as US English...</p> <p>...Interpreted as French again...</p> <p>...French text interrupted by<em xml:lang="ja">some Japanese</em>French begins here again...</p> </body> </html>
This specification does not define how this attribute gets used, since that is defined by the environment that the hyperlink is evaluated in.
XFrames not published yet
We need a reference to XFrames here, but XFrames is not yet public.Pressing an access key assigned to an element gives focus to the element. The action that occurs when an element receives focus depends on the element. For example, when a user activates a link defined by the a element, the user agent generally follows the link. When a user activates a radio button, the user agent changes the value of the radio button. When the user activates a text field, it allows input, etc.
In this example, we assign an access key to a link defined by the a element. Typing this access key takes the user to another document, in this case, a table of contents.
<p><a accesskey="C" rel="contents" href="http://someplace.com/specification/contents.html"> Table of Contents</a> </p>
The invocation of access keys depends on the underlying system. For instance, on machines running MS Windows, one generally has to press the "alt" key in addition to the access key. On Apple systems, one generally has to press the "cmd" key in addition to the access key.
The rendering of access keys depends on the user agent. We recommend that authors include the access key in label text or wherever the access key is to apply. User agents should render the value of an access key in such a way as to emphasize its role and to distinguish it from other characters (e.g., by underlining it).
The navigation order defines the order in which elements will receive focus when navigated by the user via the keyboard. The navigation order may include elements nested within other elements.
Elements that may receive focus should be navigated by user agents according to the following rules:
Tabbing keys. The actual key sequence that causes navigation or element activation depends on the configuration of the user agent (e.g., the "tab" key is used for navigation and the "enter" key is used to activate a selected element).
User agents may also define key sequences to navigate the navigation order in reverse. When the end (or beginning) of the navigation order is reached, user agents may circle back to the beginning (or end).
The global attributes from [XMLEVENTS] are included in the Events attribute collection. The normative definition of those attributes and their semantics is included in that specification. They are described briefly below:
List of XHTML 2 Events Needed
We need to define the list of XHTML 2 events and map them into the XHTML DOM.Note that these attributes are not in the XHTML namespace. Instead, they are in the XML Events namespace. The XHTML namespace is the default namespace for XHTML documents, so
XHTML elements and attributes do not require namespace prefixes (although they are permitted). XML Events attributes MUST use a prefix, since they are not in the default namespace of the document.
When XML Events are included in an XHTML document, the default prefix for those attribute is ev
.
This collection assembles the Core, I18N, Events and Hypertext attribute collections defined above.