Friday, 2 March 2012

Core Attributes


The attributes listed below are standard, and can be used in nearly all HTML/XHTML tags.

Core Attributes

Valid in all elements, except: <base>, <head>, <html>, <meta>, <param>, <script>, <style>, and <title>.
AttributeDescription
classSpecifies one or more classnames for an element (refers to a class in a style sheet)
idSpecifies a unique id for an element
styleSpecifies an inline CSS style for an element
titleSpecifies extra information about an element


Language Attributes

Valid in all elements, except: <base>, <br>, <frame>, <frameset>, <hr>, <iframe>, <param>, and <script>.
AttributeDescription
dirSpecifies the text direction for the content in an element
langSpecifies the language of the element's content
xml:langSpecifies the language of the element's content (for XHTML documents)


Keyboard Attributes

AttributeDescription
accesskeySpecifies a shortcut key to activate/focus an element
tabindexSpecifies the tabbing order of an element

No comments:

Post a Comment