📅  最后修改于: 2020-10-16 07:00:13             🧑  作者: Mango
有一些XHTML / HTML属性是标准的,并且与所有XHTML / HTML标签相关联。这些属性在此处列出,并带有简要说明-
在base,head,html,meta,param,script,style和title元素中无效。
Attribute | Value | Description |
---|---|---|
class | class_rule or style_rule | The class of the element. |
Id | id_name | A unique id for the element. |
style | style_definition | An inline style definition. |
Title | tooltip_text | A text to display in a mouse tip. |
lang属性指示用于随附内容的语言。使用ISO标准语言缩写来标识语言,例如fr代表法语, en代表英语,等等。更多代码及其格式在www.ietf.org上进行了描述。
在base,br,frame,frameset,hr,iframe,param和script元素中无效。
Attribute | Value | Description |
---|---|---|
dir | ltr | rtl | Sets the text direction. |
lang | language_code | Sets the language code. |
Microsoft在Internet Explorer 4和更高版本中引入了许多新的专有属性。
Attribute | Value | Description |
---|---|---|
accesskey | character | Sets a keyboard shortcut to access an element. |
language | string | This attribute specifies the scripting language to be used with an associated script bound to the element, typically through an event handler attribute. Possible values might include JavaScript, jScript, VBS, and VBScript. |
tabindex | number | Sets the tab order of an element. |
contenteditable | boolean | Allows users to edit content rendered in Internet Explorer 5.5 or greater. Possible values are true or false. |
disabled | boolean | Elements with the disabled attribute set may appear faded and will not respond to user input. Possible values are true or false. |
hidefocus | on or off | This proprietary attribute, introduced with Internet Explorer 5.5, hides focus on an element’s content. Focus must be applied to the element using the tabindex attribute. |
unselectable | on or off | Used to prevent content displayed in Internet Explorer 5.5 from being selected. |