This page describes the attributes that are shared between a large number of elements. Instead of repeating the same information across a lot of pages I combined these attributes on this single page. These attributes are mentioned in the descriptions of the elements, but they refer to this page for the description of the attribute.
This attribute assigns a key to access an element. The access key is a single
character from the document character set.
Note. Authors should consider the input method of the expected reader
when specifying an accesskey.
Pressing the access key of an element activates that specific element. What actually happens when the key is used, depends on the element. For example, when the key belongs to a link, the browser could load the resource the link points to. The key assigned to a button presses it, etc.
This attribute can be used with all HTML elements inside the 'BODY' section of the document. It is used to create different classes of a element, where each class can have its own properties.
For example, lets say we have defined this style sheet:
<STYLE type="text/css"> |
This creates two classes for the DIV
element, "sky"
and "grass", each with its own colors. Then you could use these
classes:
<DIV class="sky"> |
Just take a look up in the sky.
Or watch down an see the grass
|
You can omit the element name when you define the style sheet. This means that the class is not restricted to one specific element, but can be used with every element. For example, this style sheet defines the class ".nature":
<STYLE type="text/css"> |
Now you can use this style sheet with every element that you want:
<TABLE border> | ||
Isn't nature beautiful |
This attribute specifies the default direction of directionally neutral text (i.e., text that doesn't have inherent directionality as defined in [UNICODE]) and the directionality of tables. Possible values are LTR for Left-to-right text or table, and RTL for Right-to-left text or table.
This attribute assigns a name to an element. This name must be unique in a document.
This attribute specifies the language of the element's content and attribute values. The default value of this attribute is unknown. Here a some situations where a specified language can improve understanding of the contents :
The values that can be used for this attribute are language codes that
identify natural languages. This can be spoken, written, or other languages
used for the communication of information among people.
Computer languages are explicitly excluded from language codes.
[RFC1766] defines and explains the language codes that must be used in HTML documents.
Briefly, language codes consist of a primary code and a possibly empty series of subcodes:
language-code = primary-code ( "-" subcode )*
Here are some sample language codes:
Two-letter primary codes are reserved for [ISO639] language abbreviations. Two-letter codes include fr (French), de (German), it (Italian), nl (Dutch), el (Greek), es (Spanish), pt (Portuguese), ar (Arabic), he (Hebrew), ru (Russian), zh (Chinese), ja (Japanese), hi (Hindi), ur (Urdu), and sa (Sanskrit).
Any two-letter subcode is understood to be a [ISO3166] country code.
An element inherits language code information according to the following order of precedence (highest to lowest):
Content-Language: en-cockney
In this example, the primary language of the document is French ("fr"). One paragraph is declared to be in Spanish ("es"), 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 HTML 4.0//EN" |
...Interpreted as French... <P lang="es">...Interpreted as Spanish... <P>...Interpreted as French again... <P>...French text interrupted by<EM lang="ja">some Japanese</EM>French begins here again... </BODY> </HTML> |
This attribute specifies a script function or script code that will be executed when the element loses focus. This means when the state changes from being the selected item to being non-selected. This happens when the user clicks on another item with the mouse, or uses the Tab-key to progress to the next item.
This attribute specifies a script function or script code that will be executed when the user clicks on the element with the mouse.
This attribute specifies a script function or script code that will be executed when the user doubleclicks on the element with the mouse.
This attribute specifies a script function or script code that will be executed when the element gets focus. This means when the state changes from being a non-selected item to being the selected item. This happens when the user clicks on the item or by using the Tab-key to progress to the item.
This attribute specifies a script function or script code that will be executed when the user presses a key over an element.
This attribute specifies a script function or script code that will be executed when the user presses and releases a key over an element.
This attribute specifies a script function or script code that will be executed when the user releases a key over an element.
This attribute specifies a script function or script code that will be executed when the user presses the mouse button over an element.
This attribute specifies a script function or script code that will be executed when the user moves the mouse pointer within the element.
This attribute specifies a script function or script code that will be executed when the user moves the mouse pointer out of the element.
This attribute specifies a script function or script code that will be executed when the user moves the mouse pointer from outside the element over the element.
This attribute specifies a script function or script code that will be executed when the user releases the mouse button over an element.
This attribute specifies the position of the current element in the tabbing order for the current document. This value must be a number between 0 and 32767. Leading zeros are ignored by the browser.
This attribute offers advisory information about the element for which it is set.