就业培训     下载中心     Wiki     联络
登录   注册

Log
  1. 首页
  2. HTML
  3. 全局属性
  • Català فارسی Italiano Português (do Brasil)

在此页

  • List of global attributes
  • 规范
  • 浏览器兼容性
  • 另请参阅
  • 相关话题

全局属性 are attributes common to all HTML elements; they can be used on all elements, though they may have no effect on some elements.

Global attributes may be specified on all HTML 元素 , even those not specified in the standard . That means that any non-standard elements must still permit these attributes, even though using those elements means that the document is no longer HTML5-compliant. For example, HTML5-compliant browsers hide content marked as <foo hidden>...</foo> , even though <foo> is not a valid HTML element.

In addition to the basic HTML global attributes, the following global attributes also exist:

  • xml:lang and xml:base — these are inherited from the XHTML specifications and deprecated, but kept for compatibility purposes.
  • The multiple aria-* attributes, used for improving accessibility.
  • event handler attributes: onabort , onautocomplete , onautocompleteerror , onblur , oncancel , oncanplay , oncanplaythrough , onchange , onclick , onclose , oncontextmenu , oncuechange , ondblclick , ondrag , ondragend , ondragenter , ondragexit , ondragleave , ondragover , ondragstart , ondrop , ondurationchange , onemptied , onended , onerror , onfocus , oninput , oninvalid , onkeydown , onkeypress , onkeyup , onload , onloadeddata , onloadedmetadata , onloadstart , onmousedown , onmouseenter , onmouseleave , onmousemove , onmouseout , onmouseover , onmouseup , onmousewheel , onpause , onplay , onplaying , onprogress , onratechange , onreset , onresize , onscroll , onseeked , onseeking , onselect , onshow , onsort , onstalled , onsubmit , onsuspend , ontimeupdate , ontoggle , onvolumechange , onwaiting .

List of global attributes

accesskey

Provides a hint for generating a keyboard shortcut for the current element. This attribute consists of a space-separated list of characters. The browser should use the first one that exists on the computer keyboard layout.

autocapitalize
Controls whether and how text input is automatically capitalized as it is entered/edited by the user. It can have the following values:
  • off or none , no autocapitalization is applied (all letters default to lowercase)
  • on or sentences , the first letter of each sentence defaults to a capital letter; all other letters default to lowercase
  • words , the first letter of each word defaults to a capital letter; all other letters default to lowercase
  • characters , all letters should default to uppercase
class
A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the class selectors or functions like the method Document.getElementsByClassName() .
contenteditable
An enumerated attribute indicating if the element should be editable by the user. If so, the browser modifies its widget to allow editing. The attribute must take one of the following values:
  • true 或 空字符串 , which indicates that the element must be editable;
  • false , which indicates that the element must not be editable.
contextmenu
id 的 <menu> to use as the contextual menu for this element.
data-*
Forms a class of attributes, called custom data attributes, that allow proprietary information to be exchanged between the HTML 及其 DOM representation that may be used by scripts. All such custom data are available via the HTMLElement interface of the element the attribute is set on. The HTMLElement.dataset property gives access to them.
dir
An enumerated attribute indicating the directionality of the element's text. It can have the following values:
  • ltr , which means left to right and is to be used for languages that are written from the left to the right (like English);
  • rtl , which means right to left and is to be used for languages that are written from the right to the left (like Arabic);
  • auto , which lets the user agent decide. It uses a basic algorithm as it parses the characters inside the element until it finds a character with a strong directionality, then it applies that directionality to the whole element.
draggable
An enumerated attribute indicating whether the element can be dragged, using the Drag and Drop API . It can have the following values:
  • true , which indicates that the element may be dragged
  • false , which indicates that the element may not be dragged.
dropzone
An enumerated attribute indicating what types of content can be dropped on an element, using the Drag and Drop API . It can have the following values:
  • copy , which indicates that dropping will create a copy of the element that was dragged
  • move , which indicates that the element that was dragged will be moved to this new location.
  • link , will create a link to the dragged data.
exportparts

Used to transitively export shadow parts from a nested shadow tree into a containing light tree.

hidden
A Boolean attribute indicates that the element is not yet, or is no longer, relevant . For example, it can be used to hide elements of the page that can't be used until the login process has been completed. The browser won't render such elements. This attribute must not be used to hide content that could legitimately be shown.
id

Defines a unique identifier (ID) which must be unique in the whole document. Its purpose is to identify the element when linking (using a fragment identifier), scripting, or styling (with CSS).

inputmode
Provides a hint to browsers as to the type of virtual keyboard configuration to use when editing this element or its contents. Used primarily on <input> elements, but is usable on any element while in contenteditable 模式。
is
Allows you to specify that a standard HTML element should behave like a registered custom built-in element (see Using custom elements 了解更多细节)。

注意: item* attributes are part of the WHATWG HTML Microdata feature .

itemid

The unique, global identifier of an item.

itemprop
Used to add properties to an item. Every HTML element may have an itemprop attribute specified, where an itemprop consists of a name and value pair.
itemref
Properties that are not descendants of an element with the itemscope attribute can be associated with the item using an itemref . It provides a list of element ids (not itemid s) with additional properties elsewhere in the document.
itemscope
itemscope (usually) works along with itemtype to specify that the HTML contained in a block is about a particular item. itemscope creates the Item and defines the scope of the itemtype associated with it. itemtype is a valid URL of a vocabulary (such as schema.org ) that describes the item and its properties context.
itemtype
Specifies the URL of the vocabulary that will be used to define itemprop s (item properties) in the data structure. itemscope is used to set the scope of where in the data structure the vocabulary set by itemtype will be active.
lang
Helps define the language of an element: the language that non-editable elements are in, or the language that editable elements should be written in by the user. The attribute contains one “language tag” (made of hyphen-separated “language subtags”) in the format defined in Tags for Identifying Languages (BCP47) . xml:lang has priority over it.
part
A space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element.
slot
Assigns a slot in a shadow DOM shadow tree to an element: An element with a slot attribute is assigned to the slot created by the <slot> element whose name attribute's value matches that slot attribute's value.
spellcheck
An enumerated attribute defines whether the element may be checked for spelling errors. It may have the following values:
  • true , which indicates that the element should be, if possible, checked for spelling errors;
  • false , which indicates that the element should not be checked for spelling errors.
style
包含 CSS styling declarations to be applied to the element. Note that it is recommended for styles to be defined in a separate file or files. This attribute and the <style> element have mainly the purpose of allowing for quick styling, for example for testing purposes.
tabindex
An integer attribute indicating if the element can take input focus (is focusable ), if it should participate to sequential keyboard navigation, and if so, at what position. It can take several values:
  • a negative value means that the element should be focusable, but should not be reachable via sequential keyboard navigation;
  • 0 means that the element should be focusable and reachable via sequential keyboard navigation, but its relative order is defined by the platform convention;
  • a positive value means that the element should be focusable and reachable via sequential keyboard navigation; the order in which the elements are focused is the increasing value of the tabindex . If several elements share the same tabindex, their relative order follows their relative positions in the document.
title

Contains a text representing advisory information related to the element it belongs to. Such information can typically, but not necessarily, be presented to the user as a tooltip.

translate
An enumerated attribute that is used to specify whether an element's attribute values and the values of its 文本 node children are to be translated when the page is localized, or whether to leave them unchanged. It can have the following values:
  • empty string and yes , which indicates that the element will be translated.
  • no , which indicates that the element will not be translated.

规范

规范 状态 注释
HTML 实时标准
The definition of 'Global attributes' in that specification.
实时标准
Shadow Parts 工作草案 添加 part and exportparts global attributes.
HTML 5.2
The definition of 'Global attributes' in that specification.
推荐 快照 HTML 实时标准 . From HTML 5.1 , itemid , itemprop , itemref , itemscope ,和 itemtype have been added.
HTML 5.1
The definition of 'Global attributes' in that specification.
推荐 快照 HTML 实时标准 . From HTML5 , contextmenu , draggable , dropzone ,和 spellcheck have been added.
HTML5
The definition of 'Global attributes' in that specification.
推荐 快照 HTML 实时标准 . From HTML 4.01 Specification , the concept of global attributes is introduced and the dir , lang , style , id , class , tabindex , accesskey ,和 title are now true global attributes.
xml:lang which was initially part of XHTML, is now also part of HTML.
hidden , data-* , contenteditable ,和 translate have been added.
HTML 4.01 Specification 推荐 There are no global attributes defined. Several attributes that will become global attributes in subsequent specifications are defined on a subset of elements.
class and style are supported on all elements but <base> , <basefont> , <head> , <html> , <meta> , <param> , <script> , <style> ,和 <title> .
dir is supported on all elements but <applet> , <base> , <basefont> , <bdo> , <br> , <frame> , <frameset> , <iframe> , <param> ,和 <script> .
id is supported on all elements but <base> , <head> , <html> , <meta> , <script> , <style> ,和 <title> .
lang is supported on all elements but <applet> , <base> , <basefont> , <br> , <frame> , <frameset> , <iframe> , <param> ,和 <script> .
tabindex is only supported on <a> , <area> , <button> , <object> , <select> ,和 <textarea> .
accesskey is only supported on <a> , <area> , <button> , <input> , <label> , <legend> and <textarea> .
title is supported on all elements but <base> , <basefont> , <head> , <html> , <meta> , <param> , <script> ,和 <title> .

浏览器兼容性

The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
accesskey Chrome 完整支持 Yes Edge 完整支持 12 Firefox 完整支持 Yes IE 完整支持 Yes Opera 完整支持 Yes Safari 完整支持 Yes WebView Android 完整支持 Yes Chrome Android 完整支持 Yes Firefox Android 完整支持 Yes Opera Android 完整支持 Yes Safari iOS 完整支持 Yes Samsung Internet Android 完整支持 Yes
autocapitalize Chrome 不支持 No Edge ? Firefox 不支持 No IE ? Opera ? Safari 不支持 No WebView Android 完整支持 66 Chrome Android 完整支持 66 Firefox Android 不支持 No Opera Android ? Safari iOS 完整支持 5 Samsung Internet Android ?
autocomplete Chrome 完整支持 66 注意事项
完整支持 66 注意事项
注意事项 Support added for autocomplete 在 <textarea> and <select> 元素。
注意事项 Chrome does not accept off as a value. See bug 587466 .
完整支持 Yes 注意事项
注意事项 Originally only supported on the <input> 元素。
注意事项 Chrome does not accept off as a value. See bug 587466 .
Edge 完整支持 ≤79 Firefox 完整支持 Yes IE 不支持 No Opera 完整支持 Yes Safari ? WebView Android 完整支持 66 注意事项
完整支持 66 注意事项
注意事项 Support added for autocomplete 在 <textarea> and <select> 元素。
注意事项 WebView does not accept off as a value. See bug 587466 .
完整支持 Yes 注意事项
注意事项 Originally only supported on the <input> 元素。
注意事项 WebView does not accept off as a value. See bug 587466 .
Chrome Android 完整支持 66 注意事项
完整支持 66 注意事项
注意事项 Support added for autocomplete 在 <textarea> and <select> 元素。
注意事项 Chrome does not accept off as a value. See bug 587466 .
完整支持 Yes 注意事项
注意事项 Originally only supported on the <input> 元素。
注意事项 Chrome does not accept off as a value. See bug 587466 .
Firefox Android 完整支持 Yes Opera Android 完整支持 Yes Safari iOS ? Samsung Internet Android 完整支持 9.0 注意事项
完整支持 9.0 注意事项
注意事项 Support added for autocomplete 在 <textarea> and <select> 元素。
注意事项 Samsung Internet does not accept off as a value. See bug 587466 .
完整支持 Yes 注意事项
注意事项 Originally only supported on the <input> 元素。
注意事项 Samsung Internet does not accept off as a value. See bug 587466 .
class Chrome 完整支持 Yes Edge 完整支持 12 Firefox 完整支持 32 IE 完整支持 Yes Opera 完整支持 Yes Safari 完整支持 Yes WebView Android 完整支持 Yes Chrome Android 完整支持 Yes Firefox Android 完整支持 32 Opera Android 完整支持 Yes Safari iOS 完整支持 Yes Samsung Internet Android 完整支持 Yes
contenteditable Chrome 完整支持 Yes Edge 完整支持 12 Firefox 完整支持 3 IE 完整支持 5.5 Opera 完整支持 9 Safari 完整支持 Yes WebView Android 完整支持 Yes Chrome Android 完整支持 Yes Firefox Android 完整支持 4 Opera Android 完整支持 Yes Safari iOS 完整支持 Yes Samsung Internet Android 完整支持 Yes
contextmenu 弃用 Chrome 完整支持 52 注意事项 Disabled
完整支持 52 注意事项 Disabled
注意事项 This was removed from the Enable Experimental Web Platform Features due to a Web compatibility issue . In June 2017, it was removed entirely from the browsers. This is documented in Chromium bug 87553 .
Disabled From version 52: this feature is behind the --enable-blink-features runtime flag (needs to be set to ContextMenu ).
不支持 ? — 52 Disabled
Disabled Until version 52 (exclusive): this feature is behind the Enable experimental Web Platform features preference. To change preferences in Chrome, visit chrome://flags.
Edge 完整支持 79 Disabled
完整支持 79 Disabled
Disabled From version 79: this feature is behind the --enable-blink-features runtime flag (needs to be set to ContextMenu ).
Firefox 完整支持 9 IE 不支持 No Opera 完整支持 39 注意事项 Disabled
完整支持 39 注意事项 Disabled
注意事项 This was removed from the Enable Experimental Web Platform Features due to a Web compatibility issue . In June 2017, it was removed entirely from the browsers. This is documented in Chromium bug 87553 .
Disabled From version 39: this feature is behind the --enable-blink-features runtime flag (needs to be set to ContextMenu ).
不支持 ? — 39 Disabled
Disabled Until version 39 (exclusive): this feature is behind the Enable experimental Web Platform features preference.
Safari 不支持 No WebView Android 不支持 No Chrome Android 不支持 ? — 52 Disabled
不支持 ? — 52 Disabled
Disabled Until version 52 (exclusive): this feature is behind the Enable experimental Web Platform features preference. To change preferences in Chrome, visit chrome://flags.
Firefox Android 不支持 32 — 56 注意事项
不支持 32 — 56 注意事项
注意事项 支持 contextmenu attribute has been removed from Firefox for Android (See bug 1424252 ).
Opera Android 不支持 No Safari iOS 不支持 No Samsung Internet Android 不支持 ? — 6.0
data-* 属性 Chrome 完整支持 Yes Edge 完整支持 12 Firefox 完整支持 Yes IE 完整支持 Yes Opera 完整支持 Yes Safari 完整支持 Yes WebView Android 完整支持 Yes Chrome Android 完整支持 Yes Firefox Android 完整支持 Yes Opera Android 完整支持 Yes Safari iOS 完整支持 Yes Samsung Internet Android 完整支持 Yes
dir Chrome 完整支持 Yes Edge 完整支持 79 Firefox 完整支持 Yes IE 不支持 No Opera 完整支持 Yes Safari 完整支持 Yes WebView Android 完整支持 Yes Chrome Android 完整支持 Yes Firefox Android 完整支持 Yes Opera Android 完整支持 Yes Safari iOS 完整支持 Yes Samsung Internet Android 完整支持 Yes
draggable Chrome 完整支持 Yes Edge 完整支持 12 Firefox 完整支持 2 IE 完整支持 Yes Opera 完整支持 12 Safari 完整支持 Yes WebView Android 完整支持 Yes Chrome Android 完整支持 Yes Firefox Android 完整支持 4 Opera Android 完整支持 Yes Safari iOS 完整支持 Yes Samsung Internet Android 完整支持 Yes
dropzone 实验性 Chrome 不支持 ? — 58 Prefixed
不支持 ? — 58 Prefixed
Prefixed Implemented with the vendor prefix: -webkit-
Edge 不支持 No Firefox 不支持 No IE 不支持 No Opera 不支持 ? — 45 Prefixed
不支持 ? — 45 Prefixed
Prefixed Implemented with the vendor prefix: -webkit-
Safari 不支持 No WebView Android 不支持 ? — 58 Prefixed
不支持 ? — 58 Prefixed
Prefixed Implemented with the vendor prefix: -webkit-
Chrome Android 不支持 ? — 58 Prefixed
不支持 ? — 58 Prefixed
Prefixed Implemented with the vendor prefix: -webkit-
Firefox Android 不支持 No Opera Android 不支持 ? — 43 Prefixed
不支持 ? — 43 Prefixed
Prefixed Implemented with the vendor prefix: -webkit-
Safari iOS 不支持 No Samsung Internet Android 不支持 ? — 7.0 Prefixed
不支持 ? — 7.0 Prefixed
Prefixed Implemented with the vendor prefix: -webkit-
enterkeyhint Chrome 完整支持 77 Edge 不支持 No Firefox 完整支持 79 Disabled
完整支持 79 Disabled
Disabled ). To change preferences in Firefox, visit
IE 不支持 No Opera 不支持 No Safari 完整支持 13.1 WebView Android 完整支持 77 Chrome Android 完整支持 77 Firefox Android 完整支持 79 Disabled
完整支持 79 Disabled
Disabled ). To change preferences in Firefox, visit
Opera Android 不支持 No Safari iOS 完整支持 13.4 Samsung Internet Android 不支持 No
exportparts 实验性 Chrome 完整支持 73 Edge 完整支持 79 Firefox 不支持 No IE 不支持 No Opera 完整支持 60 Safari 完整支持 13.1 WebView Android 完整支持 73 Chrome Android 完整支持 73 Firefox Android 不支持 No Opera Android ? Safari iOS 完整支持 13.4 Samsung Internet Android 不支持 No
hidden Chrome 完整支持 Yes Edge 完整支持 12 Firefox 完整支持 Yes IE 完整支持 11 Opera 完整支持 Yes Safari 完整支持 Yes WebView Android 完整支持 4 Chrome Android 完整支持 Yes Firefox Android 完整支持 Yes Opera Android 完整支持 Yes Safari iOS 完整支持 Yes Samsung Internet Android 完整支持 Yes
id Chrome 完整支持 Yes Edge 完整支持 12 Firefox 完整支持 32
完整支持 32
不支持 ? — 32 注意事项
注意事项 id is a true global attribute only since Firefox 32.
IE 完整支持 Yes Opera 完整支持 Yes Safari 完整支持 Yes WebView Android 完整支持 Yes Chrome Android 完整支持 Yes Firefox Android 完整支持 32
完整支持 32
不支持 ? — 32 注意事项
注意事项 id is a true global attribute only since Firefox 32.
Opera Android 完整支持 Yes Safari iOS 完整支持 Yes Samsung Internet Android 完整支持 Yes
inputmode Chrome 完整支持 66 Edge 完整支持 79 Firefox 完整支持 23 注意事项 Disabled
完整支持 23 注意事项 Disabled
注意事项 Before version 77, Firefox does not support inputmode 当 contenteditable is true .
注意事项 Before version 75, Firefox accepts values from an earlier specification. From version 75, it accepts values from the WHATWG Living Standard. See bug 1509527 .
Disabled From version 23: this feature is behind the dom.forms.inputmode preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 17 — 23
IE 不支持 No Opera 完整支持 53 Safari 不支持 No WebView Android 完整支持 66 Chrome Android 完整支持 66 Firefox Android 完整支持 79
完整支持 79
完整支持 68 Disabled
Disabled ). To change preferences in Firefox, visit
Opera Android 完整支持 47 Safari iOS 完整支持 12.2 Samsung Internet Android 完整支持 9.0
is Chrome 完整支持 67 Edge 完整支持 79 Firefox 完整支持 63
完整支持 63
不支持 59 — 63 Disabled
Disabled From version 59 until version 63 (exclusive): this feature is behind the dom.webcomponents.customelements.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 ? — 59 Disabled
Disabled Until version 59 (exclusive): this feature is behind the dom.webcomponents.enabled preference (needs to be set to true ) 和 preference (needs to be set to ). To change preferences in Firefox, visit about:config.
IE 不支持 No Opera 完整支持 55 Safari 不支持 No WebView Android 完整支持 67 Chrome Android 完整支持 67 Firefox Android 完整支持 63
完整支持 63
不支持 59 — 63 Disabled
Disabled From version 59 until version 63 (exclusive): this feature is behind the dom.webcomponents.customelements.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 ? — 59 Disabled
Disabled Until version 59 (exclusive): this feature is behind the dom.webcomponents.enabled preference (needs to be set to true ) 和 preference (needs to be set to ). To change preferences in Firefox, visit about:config.
Opera Android 完整支持 48 Safari iOS 不支持 No Samsung Internet Android 完整支持 9.0
itemid Chrome 完整支持 Yes Edge 完整支持 12 Firefox 完整支持 Yes IE 完整支持 Yes Opera 完整支持 Yes Safari 完整支持 Yes WebView Android 完整支持 Yes Chrome Android 完整支持 Yes Firefox Android 完整支持 Yes Opera Android 完整支持 Yes Safari iOS 完整支持 Yes Samsung Internet Android 完整支持 Yes
itemprop Chrome 完整支持 Yes Edge 完整支持 12 Firefox 完整支持 Yes IE 完整支持 Yes Opera 完整支持 Yes Safari 完整支持 Yes WebView Android 完整支持 Yes Chrome Android 完整支持 Yes Firefox Android 完整支持 Yes Opera Android 完整支持 Yes Safari iOS 完整支持 Yes Samsung Internet Android 完整支持 Yes
itemref Chrome 完整支持 Yes Edge 完整支持 12 Firefox 完整支持 Yes IE 完整支持 Yes Opera 完整支持 Yes Safari 完整支持 Yes WebView Android 完整支持 Yes Chrome Android 完整支持 Yes Firefox Android 完整支持 Yes Opera Android 完整支持 Yes Safari iOS 完整支持 Yes Samsung Internet Android 完整支持 Yes
itemscope Chrome 完整支持 Yes Edge 完整支持 12 Firefox 完整支持 Yes IE 完整支持 Yes Opera 完整支持 Yes Safari 完整支持 Yes WebView Android 完整支持 Yes Chrome Android 完整支持 Yes Firefox Android 完整支持 Yes Opera Android 完整支持 Yes Safari iOS 完整支持 Yes Samsung Internet Android 完整支持 Yes
itemtype Chrome 完整支持 Yes Edge 完整支持 12 Firefox 完整支持 Yes IE 完整支持 Yes Opera 完整支持 Yes Safari 完整支持 Yes WebView Android 完整支持 Yes Chrome Android 完整支持 Yes Firefox Android 完整支持 Yes Opera Android 完整支持 Yes Safari iOS 完整支持 Yes Samsung Internet Android 完整支持 Yes
lang Chrome 完整支持 Yes Edge 完整支持 12 Firefox 完整支持 Yes IE 完整支持 Yes Opera 完整支持 Yes Safari 完整支持 Yes WebView Android 完整支持 Yes Chrome Android 完整支持 Yes Firefox Android 完整支持 Yes Opera Android 完整支持 Yes Safari iOS 完整支持 Yes Samsung Internet Android 完整支持 Yes
part 实验性 Chrome 完整支持 73 Edge 完整支持 79 Firefox 完整支持 72
完整支持 72
不支持 69 — 72 Disabled
Disabled ). To change preferences in Firefox, visit
IE 不支持 No Opera 完整支持 60 Safari 完整支持 13.1 WebView Android 完整支持 73 Chrome Android 完整支持 73 Firefox Android 不支持 No Opera Android ? Safari iOS 完整支持 13.4 Samsung Internet Android 不支持 No
slot 实验性 Chrome 完整支持 53 Edge 完整支持 ≤79 Firefox 完整支持 63
完整支持 63
不支持 59 — 63 Disabled
Disabled From version 59 until version 63 (exclusive): this feature is behind the dom.webcomponents.shadowdom.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 ? — 59 Disabled
Disabled Until version 59 (exclusive): this feature is behind the dom.webcomponents.enabled preference (needs to be set to true ) 和 preference (needs to be set to ). To change preferences in Firefox, visit about:config.
IE ? Opera 完整支持 40 Safari 完整支持 10 WebView Android 完整支持 53 Chrome Android 完整支持 53 Firefox Android 完整支持 63
完整支持 63
不支持 59 — 63 Disabled
Disabled From version 59 until version 63 (exclusive): this feature is behind the dom.webcomponents.shadowdom.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 ? — 59 Disabled
Disabled Until version 59 (exclusive): this feature is behind the dom.webcomponents.enabled preference (needs to be set to true ) 和 preference (needs to be set to ). To change preferences in Firefox, visit about:config.
Opera Android 完整支持 41 Safari iOS 完整支持 10 Samsung Internet Android 完整支持 6.0
spellcheck Chrome 完整支持 9 Edge 完整支持 12 Firefox 完整支持 Yes IE 完整支持 11 Opera 完整支持 Yes Safari 完整支持 Yes WebView Android 完整支持 47 Chrome Android 完整支持 47 Firefox Android 完整支持 57 Opera Android 完整支持 37 Safari iOS 完整支持 9.3 Samsung Internet Android 完整支持 5.0
style Chrome 完整支持 Yes Edge 完整支持 12 Firefox 完整支持 Yes IE 完整支持 Yes Opera 完整支持 Yes Safari 完整支持 Yes WebView Android 完整支持 Yes Chrome Android 完整支持 Yes Firefox Android 完整支持 Yes Opera Android 完整支持 Yes Safari iOS 完整支持 Yes Samsung Internet Android 完整支持 Yes
tabindex Chrome 完整支持 Yes Edge 完整支持 12 Firefox 完整支持 Yes IE 完整支持 Yes Opera 完整支持 Yes Safari 完整支持 Yes WebView Android 完整支持 Yes Chrome Android 完整支持 Yes Firefox Android 完整支持 Yes Opera Android 完整支持 Yes Safari iOS 完整支持 Yes Samsung Internet Android 完整支持 Yes
title Chrome 完整支持 Yes Edge 完整支持 12 Firefox 完整支持 Yes IE 完整支持 Yes Opera 完整支持 Yes Safari 完整支持 Yes WebView Android 完整支持 Yes Chrome Android 完整支持 Yes Firefox Android 完整支持 Yes Opera Android 完整支持 Yes Safari iOS 完整支持 Yes Samsung Internet Android 完整支持 Yes
translate 实验性 Chrome 完整支持 Yes Edge 完整支持 79 Firefox 不支持 No IE 不支持 No Opera 完整支持 Yes Safari 完整支持 Yes WebView Android 完整支持 Yes Chrome Android 完整支持 Yes Firefox Android 不支持 No Opera Android 完整支持 Yes Safari iOS 完整支持 Yes Samsung Internet Android 完整支持 Yes

图例

完整支持

完整支持

不支持

不支持

兼容性未知 ?

兼容性未知

实验。期望将来行为有所改变。

实验。期望将来行为有所改变。

弃用。不要用于新网站。

弃用。不要用于新网站。

见实现注意事项。

见实现注意事项。

用户必须明确启用此特征。

用户必须明确启用此特征。

要求使用供应商前缀或不同名称。

要求使用供应商前缀或不同名称。

另请参阅

  • 元素 and GlobalEventHandlers interfaces that allow to query most global attributes.

元数据

  • 最后修改: Feb 19, 2020

相关话题

  1. HTML
  2. 教程:
  3. HTML 基础
  4. HTML 介绍
    1. Introduction to HTML overview
    2. Getting started with HTML
    3. What's in the head? Metadata in HTML
    4. HTML text fundamentals
    5. Creating hyperlinks
    6. Advanced text formatting
    7. Document and website structure
    8. Debugging HTML
    9. Assessment: Marking up a letter
    10. Assessment: Structuring a page of content
  5. 多媒体和嵌入
    1. Multimedia and embedding overview
    2. Images in HTML
    3. Video and audio content
    4. From object to iframe — other embedding technologies
    5. Adding vector graphics to the Web
    6. Responsive images
    7. Assessment: Mozilla splash page
  6. 参考:
  7. HTML 元素
    1. <a>
    2. <abbr>
    3. <acronym>
    4. <address>
    5. <applet>
    6. <area>
    7. <article>
    8. <aside>
    9. <audio>
    10. <b>
    11. <base>
    12. <basefont>
    13. <bdi>
    14. <bdo>
    15. <bgsound>
    16. <big>
    17. <blink>
    18. <blockquote>
    19. <body>
    20. <br>
    21. <button>
    22. <canvas>
    23. <caption>
    24. <center>
    25. <cite>
    26. <code>
    27. <col>
    28. <colgroup>
    29. <command>
    30. <content>
    31. <data>
    32. <datalist>
    33. <dd>
    34. <del>
    35. <details>
    36. <dfn>
    37. <dialog>
    38. <dir>
    39. <div>
    40. <dl>
    41. <dt>
    42. <element>
    43. <em>
    44. <embed>
    45. <fieldset>
    46. <figcaption>
    47. <figure>
    48. <font>
    49. <footer>
    50. <form>
    51. <frame>
    52. <frameset>
    53. <h1>
    54. <head>
    55. <header>
    56. <hgroup>
    57. <hr>
    58. <html>
    59. <i>
    60. <iframe>
    61. <image>
    62. <img>
    63. <input>
    64. <ins>
    65. <isindex>
    66. <kbd>
    67. <keygen>
    68. <label>
    69. <legend>
    70. <li>
    71. <link>
    72. <listing>
    73. <main>
    74. <map>
    75. <mark>
    76. <marquee>
    77. <menu>
    78. <menuitem>
    79. <meta>
    80. <meter>
    81. <multicol>
    82. <nav>
    83. <nextid>
    84. <nobr>
    85. <noembed>
    86. <noframes>
    87. <noscript>
    88. <object>
    89. <ol>
    90. <optgroup>
    91. <option>
    92. <output>
    93. <p>
    94. <param>
    95. <picture>
    96. <plaintext>
    97. <pre>
    98. <progress>
    99. <q>
    100. <rb>
    101. <rp>
    102. <rt>
    103. <rtc>
    104. <ruby>
    105. <s>
    106. <samp>
    107. <script>
    108. <section>
    109. <select>
    110. <shadow>
    111. <slot>
    112. <small>
    113. <source>
    114. <spacer>
    115. <span>
    116. <strike>
    117. <strong>
    118. <style>
    119. <sub>
    120. <summary>
    121. <sup>
    122. <table>
    123. <tbody>
    124. <td>
    125. <template>
    126. <textarea>
    127. <tfoot>
    128. <th>
    129. <thead>
    130. <time>
    131. <title>
    132. <tr>
    133. <track>
    134. <tt>
    135. <u>
    136. <ul>
    137. <var>
    138. <video>
    139. <wbr>
    140. <xmp>
  8. 全局属性
    1. accesskey
    2. autocapitalize
    3. class
    4. contenteditable
    5. contextmenu
    6. data-*
    7. dir
    8. draggable
    9. dropzone
    10. hidden
    11. id
    12. inputmode
    13. is
    14. itemid
    15. itemprop
    16. itemref
    17. itemscope
    18. itemtype
    19. lang
    20. part
    21. slot
    22. spellcheck
    23. style
    24. tabindex
    25. title
    26. translate
    27. x-ms-acceleratorkey
    28. x-ms-format-detection
  9. <input> 类型
    1. <input type="button">
    2. <input type="checkbox">
    3. <input type="color">
    4. <input type="date">
    5. <input type="datetime">
    6. <input type="datetime-local">
    7. <input type="email">
    8. <input type="file">
    9. <input type="hidden">
    10. <input type="image">
    11. <input type="month">
    12. <input type="number">
    13. <input type="password">
    14. <input type="radio">
    15. <input type="range">
    16. <input type="reset">
    17. <input type="search">
    18. <input type="submit">
    19. <input type="tel">
    20. <input type="text">
    21. <input type="time">
    22. <input type="url">
    23. <input type="week">
  10. 文档编制:
  11. 有用清单
  12. All pages index
  13. Pages tagged "HTML"
  14. 贡献
    1. HTML 文档状态
    2. MDN 工程

版权所有  © 2014-2026 乐数软件    

工业和信息化部: 粤ICP备14079481号-1