Tag Attributes
|
Attribute |
Description |
for | The for attribute is used to associate the label with the control. This is accomplished by setting the value of the for attribute to match the control's id attribute. |
id | The id attribute assigns a unique name to a tag. This allows style sheets or scripts to reference the tag. |
class | The class attribute assigns a class name to a tag. The class name does not need to be unique. More than one tag can have the same class name. This allows style sheets or scripts to reference multiple tags with a single class name. |
style | The style attribute specifies styles for the tag. For Cascading Style Sheets (CSS), the syntax is name:value. Each name:value pair is separated by semicolons. |
title | The title attribute specifies additional information about the tag. It is common for browsers to display the title when the pointing device stops over the object. |
accesskey | The accesskey specifies a shortcut key for a tag. The action that is taken when an access key is invoked depends on the tag and may also depend on the browser. For example, if it is used with an <a> tag, some browsers may follow the link when the access key is invoked and other browsers may give focus to the link. |
onblur | The onblur attribute specifies a script to be run when the tag loses focus. |
onfocus | The onfocus attribute specifies a script to be run when the tag loses focus. |
onclick | The onclick attribute specifies a
script to be run when the object is clicked with a mouse or other pointing device. |
ondblclick | The ondblclick attribute specifies a
script to be run when the object is double clicked with a mouse or other pointing device. |
onkeydown | The onkeydown attribute specifies a
script to be run when a key is pressed down. |
onkeypress | The onkeypress attribute specifies a
script to be run when a key is pressed and released. |
onkeyup | The onkeyup attribute specifies a
script to be run when a key is released. |
onmousedown | The onmousedown attribute specifies a
script to be run when the mouse button, or other pointing device button, is pressed while over the object. |
onmousemove | The onmousemove attribute specifies a
script to be run when the mouse, or other pointing device, is moved while it is over the object. |
onmouseout | The onmouseout attribute specifies a
script to be run when the mouse, or other pointing device, is moved away from an object after being over it. |
onmouseover | The onmouseover attribute specifies a
script to be run when the mouse, or other pointing device, is moved onto the object. |
onmouseup | The onmouseup attribute specifies a
script to be run when the mouse button, or other pointing device button, is released while over the object. |
dir | The dir attribute tells the browser whether the text should be displayed from left-to-right or right-to-left. It does not reverse the direction of the characters, like the <bdo> tag does, but it can help the browser to determine if the text should be aligned on the left side or the right side. |
lang | The lang attribute specifies a language. This attribute can help the browser to correctly display text. This attribute can also be useful for braille translation software, speech synthesizers, dictionary definitions, etc. |
xml:lang | The xml:lang attribute specifies a language for XHTML documents. This attribute can help the browser to correctly display text. This attribute can also be useful for braille translation software, speech synthesizers, dictionary definitions, etc.
Note: XHTML only. |
No comments:
Post a Comment