Website Programming : Attribute Groups

6:48:00 AM |




Attribute Groups
As you saw in one of our previous articles, attributes live on the opening tag of an element and provide extra information about the element that carries them. All attributes consist of a name and a value; the name reflects a property of the element the attribute is describing and the value is a value for that property. For example,
the xml:lang attribute describes the language used within that element; a value such as EN-US would indicate that the language used inside the element is U.S. English. Many of the elements in XHTML can
carry some or all of the attributes you will meet in this section.
There are three groups of attributes that many of the XHTML elements can carry (as you have already seen, the <html>, <head>, <title>, and <body> elements share some of these attributes). Because
these attributes are common to so many of the elements, they are grouped together here to avoid having to repeat them each time they come up, so remember where you read this and you can keep referring
back to them. The groups are:
❑ Core attributes: The class, id, and title attributes.
❑ Internationalization attributes: The dir, lang, and xml:lang attributes.
❑ UI events: Attributes associated with events onclick, ondoubleclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, and onkeyup Together the core attributes and the internationalization attributes are known as the universal attributes.

0 comments: