aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/html/attributes
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/html/attributes
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/html/attributes')
-rw-r--r--files/zh-cn/web/html/attributes/index.html693
-rw-r--r--files/zh-cn/web/html/attributes/自动完成属性/index.html258
2 files changed, 951 insertions, 0 deletions
diff --git a/files/zh-cn/web/html/attributes/index.html b/files/zh-cn/web/html/attributes/index.html
new file mode 100644
index 0000000000..237ef0c2c9
--- /dev/null
+++ b/files/zh-cn/web/html/attributes/index.html
@@ -0,0 +1,693 @@
+---
+title: HTML 属性参考
+slug: Web/HTML/Attributes
+tags:
+ - Attribute
+ - HTML
+ - IDL
+ - 元素
+ - 元素属性
+ - 参考
+ - 属性
+translation_of: Web/HTML/Attributes
+---
+<p>HTML中的元素拥有属性(attribute);这些额外的属性值可以配置元素或者以各种方式来调整元素的行为,进而满足用户所需的标准。</p>
+
+<h2 id="属性列表">属性列表</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th>属性名</th>
+ <th>元素</th>
+ <th>描述</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept">accept</a></td>
+ <td>{{ HTMLElement("form") }}, {{ HTMLElement("input") }}</td>
+ <td>服务器接受内容或文件类型的列表。</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept-charset">accept-charset</a></td>
+ <td>{{ HTMLElement("form") }}</td>
+ <td>支持的字符集列表。</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/accesskey">accesskey</a></td>
+ <td><a href="/en/HTML/Global_attributes" title="en/HTML/Global attributes">全局属性</a></td>
+ <td>定义键盘快捷键来激活或者聚焦元素</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/action">action</a></td>
+ <td>{{ HTMLElement("form") }}</td>
+ <td>表单信息提交的url地址,指向进行处理的程序。</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/align">align</a></td>
+ <td>{{ HTMLElement("applet") }}, {{ HTMLElement("caption") }}, {{ HTMLElement("col") }}, {{ HTMLElement("colgroup") }},  {{ HTMLElement("hr") }}, {{ HTMLElement("iframe") }}, {{ HTMLElement("img") }}, {{ HTMLElement("table") }}, {{ HTMLElement("tbody") }},  {{ HTMLElement("td") }},  {{ HTMLElement("tfoot") }} , {{ HTMLElement("th") }}, {{ HTMLElement("thead") }}, {{ HTMLElement("tr") }}</td>
+ <td>设置元素的水平对齐。</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/allow">allow</a></td>
+ <td>{{ HTMLElement("iframe") }}</td>
+ <td>Specifies a feature-policy for the iframe.</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/alt">alt</a></td>
+ <td>
+ <p>{{ HTMLElement("applet") }}, {{ HTMLElement("area") }}, {{ HTMLElement("img") }}, {{ HTMLElement("input") }}</p>
+ </td>
+ <td>在图片无法呈现时的替代文本。</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/async">async</a></td>
+ <td>{{ HTMLElement("script") }}</td>
+ <td>表示该脚本应该异步执行。</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autocapitalize">autocapitalize</a></td>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes">全局属性</a></td>
+ <td>Sets whether input is automatically capitalized when entered by user</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete">autocomplete</a></td>
+ <td>{{ HTMLElement("form") }}, {{ HTMLElement("input") }}, {{ HTMLElement("select") }}, {{ HTMLElement("textarea") }}</td>
+ <td>表示该表单中是否可以由浏览器自动完成填值。</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autofocus">autofocus</a></td>
+ <td>{{ HTMLElement("button") }}, {{ HTMLElement("input") }}, {{ HTMLElement("keygen") }}, {{ HTMLElement("select") }}, {{ HTMLElement("textarea") }}</td>
+ <td>在网页加载后该元素应该自动聚焦。</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autoplay">autoplay</a></td>
+ <td>{{ HTMLElement("audio") }}, {{ HTMLElement("video") }}</td>
+ <td> audio或video应该自动播放</td>
+ </tr>
+ <tr>
+ <td>background</td>
+ <td>{{ HTMLElement("body") }}, {{ HTMLElement("table") }}, {{ HTMLElement("td") }}, {{ HTMLElement("th") }}</td>
+ <td>指定图像文件的URL。
+ <div class="blockIndicator note">
+ <p>注意:虽然浏览器和电子邮件客户端可能仍然支持此属性,但它已过时。改用css{{Cssxref(“back-image”)}}。</p>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td>bgcolor</td>
+ <td>{{ HTMLElement("body") }}, {{ HTMLElement("col") }}, {{ HTMLElement("colgroup") }}, {{ HTMLElement("marquee") }}, {{ HTMLElement("table") }}, {{ HTMLElement("tbody") }}, {{ HTMLElement("tfoot") }}, {{ HTMLElement("td") }}, {{ HTMLElement("th") }}, {{ HTMLElement("tr") }}</td>
+ <td>
+ <p>元素的背景颜色。</p>
+
+ <p>NOTE:这是一个遗留属性,请使用css{“background-color":}代替。</p>
+ </td>
+ </tr>
+ </tbody>
+ <tbody>
+ <tr>
+ <td>border</td>
+ <td>{{ HTMLElement("img") }}, {{ HTMLElement("object") }}, {{ HTMLElement("table") }}</td>
+ <td>
+ <p>边框宽度。</p>
+
+ <p>Note:这是遗留属性,请使用 CSS {{ Cssxref("border") }} 属性代替。</p>
+ </td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/buffered">buffered</a></td>
+ <td>{{ HTMLElement("audio") }}, {{ HTMLElement("video") }}</td>
+ <td>包含已缓存媒体的时间范围。</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/capture">capture</a></td>
+ <td>{{ HTMLElement("input") }}</td>
+ <td>From the <a href="https://w3c.github.io/html-media-capture/#the-capture-attribute" hreflang="en" lang="en" rel="noopener">HTML Media Capture<br>
+ <small lang="en-US">The definition of 'media capture' in that specification.</small></a>spec, specifies a new file can be captured.</td>
+ </tr>
+ <tr>
+ <td>challenge</td>
+ <td>{{ HTMLElement("keygen") }}</td>
+ <td>与公钥一起提交的挑战字符。</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/charset">charset</a></td>
+ <td>{{ HTMLElement("meta") }}, {{ HTMLElement("script") }}</td>
+ <td>申明该页面或脚本的字符编码。</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/checked">checked</a></td>
+ <td>{{ HTMLElement("command") }}, {{ HTMLElement("input") }}</td>
+ <td>指出该元素在页面加载后是否处于选中状态。</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/cite">cite</a></td>
+ <td>{{ HTMLElement("blockquote") }}, {{ HTMLElement("del") }}, {{ HTMLElement("ins") }}, {{ HTMLElement("q") }}</td>
+ <td>包含一个URI,用来指明引用或修改的源地址。</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/class">class</a></td>
+ <td><a href="/en/HTML/Global_attributes" title="en/HTML/Global attributes">全局属性</a></td>
+ <td>经常和CSS一起配合使用来修饰元素。</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/code">code</a></td>
+ <td>{{ HTMLElement("applet") }}</td>
+ <td>标明被加载和执行的applet类文件的URL。</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/codebase">codebase</a></td>
+ <td>{{ HTMLElement("applet") }}</td>
+ <td>指出存放applet类文件基本URL地址(绝对或相对),这些文件由code属性标明。</td>
+ </tr>
+ <tr>
+ <td>color</td>
+ <td>{{ HTMLElement("basefont") }}, {{ HTMLElement("font") }}, {{ HTMLElement("hr") }}</td>
+ <td>
+ <p>此属性可用于指定颜色, 颜色值一般有两种表示:</p>
+
+ <p>1. 以`#`号开头的RGB十六进制数,如#112233, 其中11表示的是R(红),22表示的是G绿(),33表示的是B(蓝)</p>
+
+ <p>2. 颜色的英文单词名,如`red`表示红色</p>
+ </td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/cols">cols</a></td>
+ <td>{{ HTMLElement("textarea") }}</td>
+ <td>定义一个textarea中包含多少列。</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/colspan">colspan</a></td>
+ <td>{{ HTMLElement("td") }}, {{ HTMLElement("th") }}</td>
+ <td>该属性一般用在td标签中,用于指定一个单元格占用多少列,例如:&lt;td colspan='2'&gt;表示占用一个单元格占2列.</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/content">content</a></td>
+ <td>{{ HTMLElement("meta") }}</td>
+ <td>A value associated with <code>http-equiv</code> or <code>name</code> depending on the context.</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/contenteditable">contenteditable</a></td>
+ <td><a href="/en/HTML/Global_attributes" title="en/HTML/Global attributes">全局属性</a></td>
+ <td>指出该元素的内容是否可以被编辑。</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/contextmenu">contextmenu</a></td>
+ <td><a href="/en/HTML/Global_attributes" title="en/HTML/Global attributes">全局属性</a></td>
+ <td>定义将用作元素上下文菜单的{{HTMLElement(“Menu”)}}元素的ID。</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/controls">controls</a></td>
+ <td>{{ HTMLElement("audio") }}, {{ HTMLElement("video") }}</td>
+ <td>指出浏览器是否对用户显示播放控制台(前进或回退)</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/coords">coords</a></td>
+ <td>{{ HTMLElement("area") }}</td>
+ <td>A set of values specifying the coordinates of the hot-spot region.</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/docs/Web/HTML/CORS_settings_attributes">crossorigin</a></td>
+ <td>{{ HTMLElement("audio") }}, {{ HTMLElement("img") }}, {{ HTMLElement("link") }}, {{ HTMLElement("script") }}, {{ HTMLElement("video") }}</td>
+ <td>How the element handles cross-origin requests</td>
+ </tr>
+ <tr>
+ <td><code><a href="https://wiki.developer.mozilla.org/docs/Web/API/HTMLiframeElement/csp">csp</a></code> {{experimental_inline}}</td>
+ <td>{{ HTMLElement("iframe") }}</td>
+ <td>Specifies the Content Security Policy that an embedded document must agree to enforce upon itself.</td>
+ </tr>
+ <tr>
+ <td>
+ <p><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/data">data</a></p>
+ </td>
+ <td>
+ <p>{{ HTMLElement("object") }}</p>
+ </td>
+ <td>
+ <p>资源URL地址</p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/data-*">data-*</a></p>
+ </td>
+ <td>
+ <p><a href="/en/HTML/Global_attributes" title="en/HTML/Global attributes">全局属性</a></p>
+ </td>
+ <td>
+ <p>允许你对于一个HTML元素绑定自定义的属性。</p>
+ </td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/datetime">datetime</a></td>
+ <td>{{ HTMLElement("del") }}, {{ HTMLElement("ins") }}, {{ HTMLElement("time") }}</td>
+ <td>Indicates the date and time associated with the element.</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/decoding">decoding</a></td>
+ <td>{{ HTMLElement("img") }}</td>
+ <td>Indicates the preferred method to decode the image.</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/default">default</a></td>
+ <td>{{ HTMLElement("track") }}</td>
+ <td>Indicates that the track should be enabled unless the user's preferences indicate something different.</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/defer">defer</a></td>
+ <td>{{ HTMLElement("script") }}</td>
+ <td>Indicates that the script should be executed after the page has been parsed.</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir">dir</a></td>
+ <td><a href="/en/HTML/Global_attributes" title="en/HTML/Global attributes">全局属性</a></td>
+ <td>Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/dirname">dirname</a></td>
+ <td>{{ HTMLElement("input") }}, {{ HTMLElement("textarea") }}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled">disabled</a></td>
+ <td>{{ HTMLElement("button") }}, {{ HTMLElement("command") }}, {{ HTMLElement("fieldset") }}, {{ HTMLElement("input") }}, {{ HTMLElement("keygen") }}, {{ HTMLElement("optgroup") }}, {{ HTMLElement("option") }}, {{ HTMLElement("select") }}, {{ HTMLElement("textarea") }}</td>
+ <td>Indicates whether the user can interact with the element.</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/download">download</a></td>
+ <td>{{ HTMLElement("a") }}, {{ HTMLElement("area") }}</td>
+ <td>Indicates that the hyperlink is to be used for downloading a resource.</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/draggable">draggable</a></td>
+ <td><a href="/en/HTML/Global_attributes" title="en/HTML/Global attributes">全局属性</a></td>
+ <td>Defines whether the element can be dragged.</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/dropzone">dropzone</a></td>
+ <td><a href="/en/HTML/Global_attributes" title="en/HTML/Global attributes">全局属性</a></td>
+ <td>Indicates that the element accept the dropping of content on it.</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/enctype">enctype</a></td>
+ <td>{{ HTMLElement("form") }}</td>
+ <td>Defines the content type of the form date when the <code>method</code> is POST.</td>
+ </tr>
+ <tr>
+ <td><code><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/enterkeyhint">enterkeyhint</a></code> {{experimental_inline}}</td>
+ <td>{{ HTMLElement("input") }}, {{ HTMLElement("textarea") }}, <a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/contenteditable"><code>contenteditable</code></a></td>
+ <td>The <a href="https://html.spec.whatwg.org/dev/interaction.html#input-modalities:-the-enterkeyhint-attribute" rel="noopener"><code>enterkeyhint</code></a> specifies what action label (or icon) to present for the enter key on virtual keyboards. The attribute can be used with form controls (such as the value of <code>textarea</code> elements), or in elements in an editing host (e.g., using <code>contenteditable</code> attribute).</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/for">for</a></td>
+ <td>{{ HTMLElement("label") }}, {{ HTMLElement("output") }}</td>
+ <td>描述与当前元素绑定的元素。</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/form">form</a></td>
+ <td>{{ HTMLElement("button") }}, {{ HTMLElement("fieldset") }}, {{ HTMLElement("input") }}, {{ HTMLElement("keygen") }}, {{ HTMLElement("label") }}, {{ HTMLElement("meter") }}, {{ HTMLElement("object") }}, {{ HTMLElement("output") }}, {{ HTMLElement("progress") }}, {{ HTMLElement("select") }}, {{ HTMLElement("textarea") }}</td>
+ <td>Indicates the form that is the owner of the element.</td>
+ </tr>
+ <tr>
+ <td><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Attributes/formaction">formaction</a></td>
+ <td><a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input" title="The HTML &lt;input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent. "><code>&lt;input&gt;</code></a>, <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button" title="The HTML &lt;button> element represents a clickable button, used to submit forms or anywhere in a document for accessible, standard button functionality."><code>&lt;button&gt;</code></a></td>
+ <td>Indicates the action of the element, overriding the action defined in the <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form" title="The HTML &lt;form> element represents a document section containing interactive controls for submitting information."><code>&lt;form&gt;</code></a>.</td>
+ </tr>
+ <tr>
+ <td>headers</td>
+ <td>{{ HTMLElement("td") }}, {{ HTMLElement("th") }}</td>
+ <td>IDs of the <code>&lt;th&gt;</code> elements which applies to this element.</td>
+ </tr>
+ <tr>
+ <td>height</td>
+ <td>{{ HTMLElement("canvas") }}, {{ HTMLElement("embed") }}, {{ HTMLElement("iframe") }}, {{ HTMLElement("img") }}, {{ HTMLElement("input") }}, {{ HTMLElement("object") }}, {{ HTMLElement("video") }}</td>
+ <td>注意:在某些情况下,例如&lt;div&gt;,这是一个遗留属性,在这种情况下应该使用CSS height属性。 在其他情况下,例如&lt;canvas&gt;,必须使用此属性指定高度。</td>
+ </tr>
+ </tbody>
+ <tbody>
+ <tr>
+ <td>hidden</td>
+ <td><a href="/en/HTML/Global_attributes" title="en/HTML/Global attributes">全局属性</a></td>
+ <td>Indicates the relevance of an element.</td>
+ </tr>
+ <tr>
+ <td>high</td>
+ <td>{{ HTMLElement("meter") }}</td>
+ <td>Indicates the lower bound of the upper range.</td>
+ </tr>
+ <tr>
+ <td>href</td>
+ <td>{{ HTMLElement("a") }}, {{ HTMLElement("area") }}, {{ HTMLElement("base") }}, {{ HTMLElement("link") }}</td>
+ <td>关联资源的URL。</td>
+ </tr>
+ <tr>
+ <td>hreflang</td>
+ <td>{{ HTMLElement("a") }}, {{ HTMLElement("area") }}, {{ HTMLElement("link") }}</td>
+ <td>Specifies the language of the linked resource.</td>
+ </tr>
+ <tr>
+ <td>http-equiv</td>
+ <td>{{ HTMLElement("meta") }}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>icon</td>
+ <td>{{ HTMLElement("command") }}</td>
+ <td>Specifies a picture which represents the command.</td>
+ </tr>
+ <tr>
+ <td>id</td>
+ <td><a href="/en/HTML/Global_attributes" title="en/HTML/Global attributes">全局属性</a></td>
+ <td>Often used with CSS to style a specific element. The value of this attribute must be unique.</td>
+ </tr>
+ <tr>
+ <td>ismap</td>
+ <td>{{ HTMLElement("img") }}</td>
+ <td>Indicatesthat the image is part of a server-side image map.</td>
+ </tr>
+ <tr>
+ <td>itemprop</td>
+ <td><a href="/en/HTML/Global_attributes" title="en/HTML/Global attributes">全局属性</a></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>keytype</td>
+ <td>{{ HTMLElement("keygen") }}</td>
+ <td>Specifies the type of key generated.</td>
+ </tr>
+ <tr>
+ <td>kind</td>
+ <td>{{ HTMLElement("track") }}</td>
+ <td>Specifies the kind of text track.</td>
+ </tr>
+ <tr>
+ <td>label</td>
+ <td>{{ HTMLElement("track") }}</td>
+ <td>Specifies a user-readable title of the text track.</td>
+ </tr>
+ <tr>
+ <td>lang</td>
+ <td><a href="/en/HTML/Global_attributes" title="en/HTML/Global attributes">全局属性</a></td>
+ <td>Defines the language used in the element.</td>
+ </tr>
+ <tr>
+ <td>language</td>
+ <td>{{ HTMLElement("script") }}</td>
+ <td>Defines the script language used in the element.</td>
+ </tr>
+ <tr>
+ <td>list</td>
+ <td>{{ HTMLElement("input") }}</td>
+ <td>Identifies a list of pre-defined options to suggest to the user.</td>
+ </tr>
+ <tr>
+ <td>loop</td>
+ <td>{{ HTMLElement("audio") }}, {{ HTMLElement("bgsound") }}, {{ HTMLElement("marquee") }}, {{ HTMLElement("video") }}</td>
+ <td>Indicates whether the media should start playing from the start when it's finished.</td>
+ </tr>
+ <tr>
+ <td>low</td>
+ <td>{{ HTMLElement("meter") }}</td>
+ <td>Indicates the upper bound of the lower range.</td>
+ </tr>
+ <tr>
+ <td>manifest</td>
+ <td>{{ HTMLElement("html") }}</td>
+ <td>Specifies the URL of the document's cache manifest.</td>
+ </tr>
+ <tr>
+ <td>max</td>
+ <td>{{ HTMLElement("input") }}, {{ HTMLElement("meter") }}, {{ HTMLElement("progress") }}</td>
+ <td>Indicates the maximum value allowed.</td>
+ </tr>
+ <tr>
+ <td>maxlength</td>
+ <td>{{ HTMLElement("input") }}, {{ HTMLElement("textarea") }}</td>
+ <td>Defines the maximum number of characters allowed in the element.</td>
+ </tr>
+ <tr>
+ <td>media</td>
+ <td>{{ HTMLElement("a") }}, {{ HTMLElement("area") }}, {{ HTMLElement("link") }}, {{ HTMLElement("source") }}, {{ HTMLElement("style") }}</td>
+ <td>Specifies a hint of the media for which the linked resource was designed.</td>
+ </tr>
+ <tr>
+ <td>method</td>
+ <td>{{ HTMLElement("form") }}</td>
+ <td>Defines which HTTP method to use when submitting the form. Can be GET (default) or POST.</td>
+ </tr>
+ <tr>
+ <td>min</td>
+ <td>{{ HTMLElement("input") }}, {{ HTMLElement("meter") }}</td>
+ <td>Indicates the minimum value allowed.</td>
+ </tr>
+ <tr>
+ <td>multiple</td>
+ <td>{{ HTMLElement("input") }}, {{ HTMLElement("select") }}</td>
+ <td>Indicates whether multiple values can be entered in an input of the type <code>email</code> or <code>file</code>.</td>
+ </tr>
+ <tr>
+ <td>name</td>
+ <td>{{ HTMLElement("button") }}, {{ HTMLElement("form") }}, {{ HTMLElement("fieldset") }}, {{ HTMLElement("iframe") }}, {{ HTMLElement("input") }}, {{ HTMLElement("keygen") }}, {{ HTMLElement("object") }}, {{ HTMLElement("output") }}, {{ HTMLElement("select") }}, {{ HTMLElement("textarea") }}, {{ HTMLElement("map") }}, {{ HTMLElement("meta") }}, {{ HTMLElement("param") }}</td>
+ <td>Name of the element. For example used by the server to identify the fields in form submits.</td>
+ </tr>
+ <tr>
+ <td>novalidate</td>
+ <td>{{ HTMLElement("form") }}</td>
+ <td>This attribute indicates that the form shouldn't be validated when submitted.</td>
+ </tr>
+ <tr>
+ <td>open</td>
+ <td>{{ HTMLElement("details") }}</td>
+ <td>Indicates whether the details will be shown on page load.</td>
+ </tr>
+ <tr>
+ <td>optimum</td>
+ <td>{{ HTMLElement("meter") }}</td>
+ <td>Indicates the optimal numeric value.</td>
+ </tr>
+ <tr>
+ <td>pattern</td>
+ <td>{{ HTMLElement("input") }}</td>
+ <td>Defines a regular expression which the element's value will be validated against.</td>
+ </tr>
+ <tr>
+ <td>ping</td>
+ <td>{{ HTMLElement("a") }}, {{ HTMLElement("area") }}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>placeholder</td>
+ <td>{{ HTMLElement("input") }}, {{ HTMLElement("textarea") }}</td>
+ <td>Provides a hint to the user of what can be entered in the field.</td>
+ </tr>
+ <tr>
+ <td>poster</td>
+ <td>{{ HTMLElement("video") }}</td>
+ <td>A URL indicating a poster frame to show until the user plays or seeks.</td>
+ </tr>
+ <tr>
+ <td>preload</td>
+ <td>{{ HTMLElement("audio") }}, {{ HTMLElement("video") }}</td>
+ <td>Indicates whether the whole resource, parts of it or nothing should be preloaded.</td>
+ </tr>
+ <tr>
+ <td>pubdate</td>
+ <td>{{ HTMLElement("time") }}</td>
+ <td>Indicates whether this date and time is the date of the nearest {{ HTMLElement("article") }} ancestor element.</td>
+ </tr>
+ <tr>
+ <td>radiogroup</td>
+ <td>{{ HTMLElement("command") }}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>readonly</td>
+ <td>{{ HTMLElement("input") }}, {{ HTMLElement("textarea") }}</td>
+ <td>Indicates whether the element can be edited.</td>
+ </tr>
+ <tr>
+ <td>rel</td>
+ <td>{{ HTMLElement("a") }}, {{ HTMLElement("area") }}, {{ HTMLElement("link") }}</td>
+ <td>Specifies the relationship of the target object to the link object.</td>
+ </tr>
+ <tr>
+ <td>required</td>
+ <td>{{ HTMLElement("input") }}, {{ HTMLElement("select") }}, {{ HTMLElement("textarea") }}</td>
+ <td>Indicates whether this element is required to fill out or not.</td>
+ </tr>
+ <tr>
+ <td>reversed</td>
+ <td>{{ HTMLElement("ol") }}</td>
+ <td>Indicates whether the list should be displayed in a descending order instead of a ascending.</td>
+ </tr>
+ <tr>
+ <td>rows</td>
+ <td>{{ HTMLElement("textarea") }}</td>
+ <td>Defines the number of rows in a textarea.</td>
+ </tr>
+ <tr>
+ <td>rowspan</td>
+ <td>{{ HTMLElement("td") }}, {{ HTMLElement("th") }}</td>
+ <td>Defines the number of rows a table cell should span over.</td>
+ </tr>
+ <tr>
+ <td>sandbox</td>
+ <td>{{ HTMLElement("iframe") }}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>spellcheck</td>
+ <td><a href="/en/HTML/Global_attributes" title="en/HTML/Global attributes">全局属性</a></td>
+ <td>Indicates whether spell checking is allowed for the element.</td>
+ </tr>
+ <tr>
+ <td>scope</td>
+ <td>{{ HTMLElement("th") }}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>scoped</td>
+ <td>{{ HTMLElement("style") }}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>seamless</td>
+ <td>{{ HTMLElement("iframe") }}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>selected</td>
+ <td>{{ HTMLElement("option") }}</td>
+ <td>Defines a value which will be selected on page load.</td>
+ </tr>
+ <tr>
+ <td>shape</td>
+ <td>{{ HTMLElement("a") }}, {{ HTMLElement("area") }}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>size</td>
+ <td>{{ HTMLElement("input") }}, {{ HTMLElement("select") }}</td>
+ <td>Defines the width of the element (in pixels). If the element's <code>type</code> attribute is <code>text</code> or <code>password</code> then it's the number of characters.</td>
+ </tr>
+ <tr>
+ <td>sizes</td>
+ <td>{{ HTMLElement("link") }}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>span</td>
+ <td>{{ HTMLElement("col") }}, {{ HTMLElement("colgroup") }}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>src</td>
+ <td>{{ HTMLElement("audio") }}, {{ HTMLElement("embed") }}, {{ HTMLElement("iframe") }}, {{ HTMLElement("img") }}, {{ HTMLElement("input") }}, {{ HTMLElement("script") }}, {{ HTMLElement("source") }}, {{ HTMLElement("track") }}, {{ HTMLElement("video") }}</td>
+ <td>The URL of the embeddable content.</td>
+ </tr>
+ <tr>
+ <td>srcdoc</td>
+ <td>{{ HTMLElement("iframe") }}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>srclang</td>
+ <td>{{ HTMLElement("track") }}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>start</td>
+ <td>{{ HTMLElement("ol") }}</td>
+ <td>Defines the first number if other than 1.</td>
+ </tr>
+ <tr>
+ <td>step</td>
+ <td>{{ HTMLElement("input") }}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>style</td>
+ <td><a href="/en/HTML/Global_attributes" title="en/HTML/Global attributes">全局属性</a></td>
+ <td>定义CSS样式,这些样式会覆盖之前设置的样式。</td>
+ </tr>
+ <tr>
+ <td>summary</td>
+ <td>{{ HTMLElement("table") }}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>tabindex</td>
+ <td><a href="/en/HTML/Global_attributes" title="en/HTML/Global attributes">全局属性</a></td>
+ <td>Overrides the browser's default tab order and follows the one specified instead.</td>
+ </tr>
+ <tr>
+ <td>target</td>
+ <td>{{ HTMLElement("a") }}, {{ HTMLElement("area") }}, {{ HTMLElement("base") }}, {{ HTMLElement("form") }}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>title</td>
+ <td><a href="/en/HTML/Global_attributes" title="en/HTML/Global attributes">全局属性</a></td>
+ <td>当鼠标悬停在元素上面时,提示框显示的文本。</td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>{{ HTMLElement("button") }}, {{ HTMLElement("input") }}, {{ HTMLElement("command") }}, {{ HTMLElement("embed") }}, {{ HTMLElement("object") }}, {{ HTMLElement("script") }}, {{ HTMLElement("source") }}, {{ HTMLElement("style") }}, {{ HTMLElement("menu") }}</td>
+ <td>定义元素的类型。</td>
+ </tr>
+ <tr>
+ <td>usemap</td>
+ <td>{{ HTMLElement("img") }},  {{ HTMLElement("input") }}, {{ HTMLElement("object") }}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>value</td>
+ <td>{{ HTMLElement("button") }}, {{ HTMLElement("option") }}, {{ HTMLElement("input") }}, {{ HTMLElement("li") }}, {{ HTMLElement("meter") }}, {{ HTMLElement("progress") }}, {{ HTMLElement("param") }}</td>
+ <td>定义页面加载时,在元素内显示的默认值。</td>
+ </tr>
+ <tr>
+ <td>width</td>
+ <td>{{ HTMLElement("canvas") }}, {{ HTMLElement("embed") }}, {{ HTMLElement("iframe") }}, {{ HTMLElement("img") }}, {{ HTMLElement("input") }}, {{ HTMLElement("object") }}, {{ HTMLElement("video") }}</td>
+ <td>Note: In some instances, such as {{ HTMLElement("div") }}, this is a legacy attribute, in which case the CSS {{ Cssxref("width") }} property should be used instead. In other cases, such as {{ HTMLElement("canvas") }}, the width must be specified with this attribute.</td>
+ </tr>
+ <tr>
+ <td>wrap</td>
+ <td>{{ HTMLElement("textarea") }}</td>
+ <td>Indicates whether the text should be wrapped.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="内容属性和_IDL属性">内容属性和 IDL属性</h2>
+
+<p>在 HTML 中,大多数属性都有两副面孔:<strong>内容属性</strong>和 <strong>IDL(接口描述语言)属性</strong>。</p>
+
+<p>内容属性需要你在内容(HTML 代码)中设置,而且可以通过 {{domxref("element.setAttribute()")}} 或 {{domxref("element.getAttribute()")}}来设置。内容属性常常是一个字符串,即使里面的值是一个证书。例如,要将 {{HTMLElement("input")}} 元素的 <code>maxlength</code> 设置为 42,你需要在元素中调用 <code>setAttribute("maxlength", "42")</code> 。</p>
+
+<p>IDL 属性(attribute)也就是一个 JavaScript 属性(property)。你可以使用 JavaScript 属性如 <code>element.foo</code> 来设置这些属性。当你需要获取 IDL 属性的值时,IDL 属性总会使用隐含的内容属性的值(可能先经过转换)来返回一个值。同样地,当你设置这个值时,这个值会保存在内容属性中。换句话说,IDL 属性本质上反映了内容属性。</p>
+
+<p>大多数时候,IDL 属性会返回元素确实在用的值。例如,{{HTMLElement("input")}} 的默认 <code>type</code> 是 "text",所以如果你设置 <code>input.type="foobar"</code>,<code>&lt;input&gt;</code> 元素仍然会是文本类型(在外观上和表现上),但 "type" 内容属性的值是 "foobar"。然而,<code>type</code> IDL 属性依旧会返回字符串 "text"。</p>
+
+<p>IDL attributes 并不总是字符串;例如 <code>input.maxlength</code> 是一个数字(一个有符号的 long 类型)。使用 IDL 属性时,你读取或设置值的类型都是要求的类型。所以 <code>input.maxlength</code> 总会返回一个数字,而如果你要设置 <code>input.maxlength</code>,也需要使用数字。如果你传入了别的类型,则会根据标准 JavaScript 的类型转换规则被转换为数字。</p>
+
+<p>IDL 属性可以 <a href="https://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#reflecting-content-attributes-in-idl-attributes">反映其他类型</a>,如 unsigned long, URLs, booleans 等。不幸的是,并没有清晰的规则规定一个属性的 IDL 属性与相关的内容属性如何关联。大多数时候,这会遵守 <a href="https://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#reflecting-content-attributes-in-idl-attributes">规范中列出的规则</a>,但有时并不遵守。HTML 规范尝试将这件事尽可能变得对开发者友好,但由于很多原因(大多是历史原因),一些属性表现得很奇怪(例如 <code>select.size</code>),你就需要阅读规范以理解它们实际上到底如何表现。</p>
+
+<h2 id="布尔值属性">布尔值属性</h2>
+
+<p>一些内容属性(例如 <code>required</code>, <code>readonly</code>, <code>disabled</code>)是<a href="https://www.w3.org/TR/html52/infrastructure.html#sec-boolean-attributes">布尔值属性</a>。如果一个布尔值属性存在,则其值是 <strong>true</strong>,如果不存在,其值是  <strong>false</strong>。</p>
+
+<p>HTML5 定义了布尔值属性允许的取值:如果属性存在,其值必须是一个空字符串(即该属性的值未分配),或者是一个大小写无关的 ASCII 字符串,该字符串与属性名严格相同,前后都没有空格。下述例子是为一个布尔值属性取值的几个有效方式。</p>
+
+<pre class="notranslate">&lt;div itemscope&gt; This is valid HTML but invalid XML. &lt;/div&gt;
+&lt;div itemscope=itemscope&gt; This is also valid HTML but invalid XML. &lt;/div&gt;
+&lt;div itemscope=""&gt; This is valid HTML and also valid XML. &lt;/div&gt;
+&lt;div itemscope="itemscope"&gt; This is also valid HTML and XML, but perhaps a bit verbose. &lt;/div&gt;</pre>
+
+<p>再明确一点,布尔值属性不能取值为 "<code>true</code>" 和 "<code>false</code>"。如果需要表示 false 值,布尔值属性需要整个忽略不写。这个限制澄清了一些常见误会:比如在元素中设置 <code>checked="false"</code> ,元素的 <code>checked</code> 属性会被解读为 <strong>true</strong>,因为这个属性出现了。</p>
+
+<h2 id="参见">参见</h2>
+
+<ul>
+ <li><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Element">HTML elements</a></li>
+</ul>
diff --git a/files/zh-cn/web/html/attributes/自动完成属性/index.html b/files/zh-cn/web/html/attributes/自动完成属性/index.html
new file mode 100644
index 0000000000..af7452c6f7
--- /dev/null
+++ b/files/zh-cn/web/html/attributes/自动完成属性/index.html
@@ -0,0 +1,258 @@
+---
+title: The HTML 自动完成属性
+slug: Web/HTML/Attributes/自动完成属性
+tags:
+ - HTML
+ - 参考
+ - 地址
+ - 密码
+ - 属性
+ - 用户名
+ - 电话号码
+ - 自动完成
+ - 邮件地址
+translation_of: Web/HTML/Attributes/autocomplete
+---
+<div>{{HTMLSidebar("Global_attributes")}}</div>
+
+<p>HTML <code>autocomplete</code> 属性可用于以文本或数字值作为输入的 {{HTMLElement("input")}} 元素 , {{HTMLElement("textarea")}} 元素, {{HTMLElement("select")}} 元素, 和{{HTMLElement("form")}} 元素。 <span class="seoSummary"><code>autocomplete</code> </span>允许web开发人员指定,如果有任何权限<span class="seoSummary"> {{Glossary("user agent")}} </span>必须提供填写表单字段值的自动帮助,并为浏览器提供关于字段中所期望的信息类型的指导。</p>
+
+<p>建议值的来源通常取决于浏览器。 通常,值来自用户输入的过去值,但它们也可能来自预先配置的值。 例如,浏览器可能允许用户保存其姓名,地址,电话号码和电子邮件地址,以实现自动完成目的。 也许浏览器提供了保存加密的信用卡信息的功能,以便在身份验证过程后自动完成。</p>
+
+<p>如果 {{HTMLElement("input")}}, {{HTMLElement("select")}} 或{{HTMLElement("textarea")}} 元素 没有 <code>autocomplete</code> 属性, t则该浏览器将使用该元素的表单的 <code>autocomplete</code> 属性所有者,它们可是元素的后代 {{HTMLElement("form")}} 元素 也可以是其  <code>id</code>  由元素{{htmlattrxref("form", "input")}} 属性指定的  <code>&lt;form&gt;</code>。</p>
+
+<p>有关更多信息,请参见 {{HTMLElement("form")}} 中的{{htmlattrxref("autocomplete", "form")}}  属性。</p>
+
+<div class="blockIndicator note">
+<p>为了提供自动完成功能,用户代理可能需要<code>&lt;input&gt;</code>/<code>&lt;select&gt;</code>/<code>&lt;textarea&gt;</code> 元素才能:</p>
+
+<ol>
+ <li>具有 <code>name</code> 和/或 <code>id</code> 属性</li>
+ <li>成为 <code>&lt;form&gt; </code> 的后代</li>
+ <li>具有 {{HTMLElement("input/submit", "submit")}} 按钮的表单</li>
+</ol>
+</div>
+
+<h2 id="价值">价值</h2>
+
+<dl>
+ <dt>"<code>off</code>"</dt>
+ <dd>浏览器不允许为此字段自动输入或选择一个值。 文档或应用程序可能提供其自己的自动完成功能,或者出于安全方面的考虑,要求不要自动输入该字段的值。
+ <div class="note"><strong>注意:</strong> 在大多数现代浏览器中, <code>autocomplete</code> 设置为 "<code>off</code>" 不会阻止密码管理器询问用户是否要保存用户名和密码信息,或者自动在网站的登录表单中填写这些值。 请参阅 <a href="/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion#The_autocomplete_attribute_and_login_fields">the autocomplete attribute and login fields</a>.</div>
+ </dd>
+ <dt>"<code>on</code>"</dt>
+ <dd>允许浏览器自动完成输入。 没有提供有关该字段中期望的数据类型的指导,因此浏览器可以使用自己的判断。</dd>
+ <dt>"<code>name</code>"</dt>
+ <dd>该字段期望该值是一个人的全名。 通常首选使用“名称”而不是将名称分解为各个组成部分,因为这样可以避免处理各种各样的人类名称及其结构。 但是,如果需要将名称分解为各个组成部分,则可以使用以下自动完成值:
+ <dl>
+ <dt>"<code>honorific-prefix</code>"</dt>
+ <dd>前缀或标题,例如“ Mrs.”,“ Mr.”,“ Miss”,“ Ms.”,“ Dr.”或“ Mlle.”。</dd>
+ <dt>"<code>given-name</code>"</dt>
+ <dd>给定的(或“名字”)名称。</dd>
+ <dt>"<code>additional-name</code>"</dt>
+ <dd>中间名。</dd>
+ <dt>"<code>family-name</code>"</dt>
+ <dd>姓氏(或“姓氏”)。</dd>
+ <dt>"<code>honorific-suffix</code>"</dt>
+ <dd>后缀,例如 "Jr.", "B.Sc.", "PhD.", "MBASW", or "IV".</dd>
+ <dt>"<code>nickname</code>"</dt>
+ <dd>昵称或名称。</dd>
+ </dl>
+ </dd>
+ <dt>"<code>email</code>"</dt>
+ <dd>电子邮件地址。</dd>
+ <dt>"<code>username</code>"</dt>
+ <dd>用户名或帐户名。</dd>
+ <dt>"<code>new-password</code>"</dt>
+ <dd>新密码。 创建新帐户或更改密码时,应将其用于“输入新密码”或“确认新密码”字段,而不是通常出现的“输入当前密码”字段。 浏览器可以使用它来避免意外填写现有密码,并在创建安全密码时提供帮助(另请参见 <a href="/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion#Preventing_autofilling_with_autocompletenew-password">Preventing autofilling with autocomplete="new-password"</a>).</dd>
+ <dt>"<code>current-password</code>"</dt>
+ <dd>用户的当前密码</dd>
+ <dt>"<code>one-time-code</code>"</dt>
+ <dd>用于验证用户身份的一次性代码。</dd>
+ <dt>"<code>organization-title</code>"</dt>
+ <dd>职务或组织内某人的职务,例如“高级技术作家”,“总裁”或“助理部队负责人”。</dd>
+ <dt>"<code>organization</code>"</dt>
+ <dd>公司或组织名称,例如“ Acme Widget Company”或“ American Girl Scouts of America”。</dd>
+ <dt>"<code>street-address</code>"</dt>
+ <dd>街道地址。 它可以是多行文本,应在第二个行政级别(通常是城市或城镇)内完全标识地址的位置,但不应包括城市名称,邮政编码或邮政编码或国家/地区名称。</dd>
+ <dt>"<code>address-line1</code>", "<code>address-line2</code>", <code>"address-line3"</code></dt>
+ <dd>街道地址的每一行。 仅在还存在 "<code>street-address</code>" 的情况下,才应提供这些内容。.</dd>
+ <dt>"<code>address-level4</code>"</dt>
+ <dd>在具有四个级别的地址中,粒度最细的 {{anch("Administrative levels in addresses", "administrative level")}}。</dd>
+ <dt>"<code>address-level3</code>"</dt>
+ <dd>第三个 {{anch("Administrative levels in addresses", "administrative level")}}, 在具有至少三个管理级别的地址中。</dd>
+ <dt>"<code>address-level2</code>"</dt>
+ <dd>第二个 {{anch("Administrative levels in addresses", "administrative level")}}, 在地址中至少有两个。 在具有两个行政级别的国家/地区中,通常是地址所在的城市,城镇,村庄或其他地区。</dd>
+ <dt>"<code>address-level1</code>"</dt>
+ <dd>地址中的第一个 {{anch("Administrative levels in addresses", "administrative level")}} 。 通常是地址所在的省份。 在美国,这就是州。 在瑞士,行政区。 在英国,小镇。<br>
+ “国家”</dd>
+ <dt>"<code>country</code>"</dt>
+ <dd>国家代码。</dd>
+ <dt>"<code>country-name</code>"</dt>
+ <dd>一个国家的名字。</dd>
+ <dt>"<code>postal-code</code>"</dt>
+ <dd>邮政编码(在美国,这是邮政编码)。</dd>
+ <dt>"<code>cc-name</code>"</dt>
+ <dd>打印在付款工具(例如信用卡)上或与之关联的全名。 通常,使用全名字段比将名称分成多个部分更可取。</dd>
+ <dt>"<code>cc-given-name</code>"</dt>
+ <dd>在信用卡之类的付款工具上给出的给定(名字)名称。</dd>
+ <dt>"<code>cc-additional-name</code>"</dt>
+ <dd>付款工具或信用卡上的中间名。</dd>
+ <dt>"<code>cc-family-name</code>"</dt>
+ <dd>信用卡上的姓氏。</dd>
+ <dt>"<code>cc-number</code>"</dt>
+ <dd>信用卡号码或其他标识付款方式的号码,例如帐号。</dd>
+ <dt>"<code>cc-exp</code>"</dt>
+ <dd>付款方式的到期日期,通常为“ 月份 / 年份”或“ 月份 / 年份”形式。</dd>
+ <dt>"<code>cc-exp-month</code>"</dt>
+ <dd>付款方式到期的月份。</dd>
+ <dt>"<code>cc-exp-year</code>"</dt>
+ <dd>付款方式到期的年份。.</dd>
+ <dt>"<code>cc-csc</code>"</dt>
+ <dd>付款工具的安全码; 在信用卡上,这是信用卡背面的3位数验证码。</dd>
+ <dt>"<code>cc-type</code>"</dt>
+ <dd>付款方式的类型(例如“ Visa”或“ Master Card”)。</dd>
+ <dt>"<code>transaction-currency</code>"</dt>
+ <dd>进行交易的货币。</dd>
+ <dt>"<code>transaction-amount</code>"</dt>
+ <dd>以 "<code>transaction-currency</code>" 指定的货币表示的金额,用于支付形式。</dd>
+ <dt>"<code>language</code>"</dt>
+ <dd>作为有效的 <a href="https://en.wikipedia.org/wiki/IETF_language_tag">BCP 47 语言标记</a>提供的首选语言。</dd>
+ <dt>"<code>bday</code>"</dt>
+ <dd>出生日期,作为完整日期。</dd>
+ <dt>"<code>bday-day</code>"</dt>
+ <dd>出生日期的月份中的一天。</dd>
+ <dt>"<code>bday-month</code>"</dt>
+ <dd>出生日期的月份。</dd>
+ <dt>"<code>bday-year</code>"</dt>
+ <dd>出生日期的年份。</dd>
+ <dt>"<code>sex</code>"</dt>
+ <dd>性别身份(例如“女性”,“法法芬”,“男性”),不带换行符的自由格式文本。</dd>
+ <dt>"<code>tel</code>"</dt>
+ <dd>
+ <p>完整的电话号码,包括国家/地区代码。 如果您需要将电话号码分为几个部分,则可以将以下值用于这些字段:</p>
+
+ <dl>
+ <dt>"<code>tel-country-code</code>"</dt>
+ <dd>国家/地区代码,例如美国,加拿大和北美其他地区以及加勒比海部分地区的“ 1”。</dd>
+ <dt>"<code>tel-national</code>"</dt>
+ <dd>不含国家/地区代码部分的完整电话号码,包括国家/地区内部前缀。 对于电话号码“ 1-855-555-6502”,该字段的值为“ 855-555-6502”。</dd>
+ <dt>"<code>tel-area-code</code>"</dt>
+ <dd>区号,如果适用,可应用任何国家或地区内部前缀。</dd>
+ <dt>"<code>tel-local</code>"</dt>
+ <dd>不带国家或地区代码的电话号码。 这可以进一步分为两部分,分别是具有交换号码的电话号码,然后是交换局中的号码。 对于电话号码“ 555-6502”, 对于“ 555”使用 "<code>tel-local-prefix</code>" ,对于"6502"使用  "<code>tel-local-suffix</code>" 。</dd>
+ </dl>
+ </dd>
+ <dt>"<code>tel-extension</code>"</dt>
+ <dd>电话号码中的电话分机代码,例如旅馆中的房间或套房号或公司中的办公室分机号。</dd>
+ <dt>"<code>impp</code>"</dt>
+ <dd>即时消息协议端点的URL,例如“ xmpp:username@example.net”。</dd>
+ <dt>"<code>url</code>"</dt>
+ <dd>URL,例如在给定表单中其他字段的上下文的情况下的主页或公司网站地址等。</dd>
+ <dt>"<code>photo</code>"</dt>
+ <dd>代表表单中其他字段中提供的个人,公司或联系信息的图像的URL。</dd>
+</dl>
+
+<p>有关更多详细信息,请参见 <a href="https://html.spec.whatwg.org/multipage/forms.html#autofill">WHATWG 标准。 </a></p>
+
+<div class="note">
+<p><strong>注意:</strong> 与其他浏览器不同, <code>autocomplete</code> 属性还控制Firefox是否会跨页面加载保持— <a href="https://stackoverflow.com/questions/5985839/bug-with-firefox-disabled-attribute-of-input-not-resetting-when-refreshing">是否在整个页面加载期间保持</a>  <code>&lt;input&gt;</code> 元素, <code>&lt;textarea&gt;</code> 元素, 或整个 <code>&lt;form&gt;</code> 的动态禁用状态和(如果适用)动态检查状态。 持久性功能默认情况下处于启用状态。 将 <code>autocomplete</code> 属性的值设置为<code>off</code> 将禁用此功能。即使<code>autocomplete</code> 属性通常由于其<code>type</code>而不适用,也可以这样做。 参考 {{bug(654072)}}.</p>
+</div>
+
+<h2 id="例子">例子</h2>
+
+<pre class="brush: html">&lt;div&gt;
+ &lt;label for="cc-number"&gt;Enter your credit card number&lt;/label&gt;
+ &lt;input type="number" name="cc-number" id="cc-number" autocomplete="off"&gt;
+&lt;/div&gt;</pre>
+
+<h2 id="地址的行政级别">地址的行政级别</h2>
+
+<p>四个行政级别字段 (<code>address-level1</code> 到 <code>address-level4</code>) 以提高地址所在国家内的精确度的方式描述地址。每个国家都有自己的行政级别系统,在写地址时可以按不同的顺序排列。</p>
+
+<p><code>address-level1</code> 始终代表最广泛的行政区划;它是地址中除国家名之外最不特定的部分。</p>
+
+<h3 id="表单布局的灵活性">表单布局的灵活性</h3>
+
+<p>鉴于不同的国家/地区以不同的方式写出地址,每个字段都位于地址内的不同位置,甚至完全是不同的字段集和数量,因此,如果可能的话,您的站点能够切换到预期的布局会很有帮助 由您的用户在提供地址输入表格时给出,并给出地址所在的国家/地区。</p>
+
+<h3 id="变化">变化</h3>
+
+<p>每个行政级别的使用方式因国家/地区而异。 以下是一些示例; 这并不是详尽的清单。</p>
+
+<h4 id="美国">美国</h4>
+
+<p>美国境内的典型家庭住址如下所示:</p>
+
+<p>大街432号<br>
+ Exampleville CA 95555</p>
+
+<p>在美国,地址中最不明确的部分是州,在这种情况下为“ CA”(美国邮政服务的正式缩写为“ California”)。 因此,<code>address-level1</code> 是状态,在这种情况下为“ CA”。</p>
+
+<p>地址的倒数第二个特定部分是城市或城镇名称,因此在此示例地址中, <code>address-level2</code> 为“ Exampleville”。</p>
+
+<p>美国地址不使用3级及更高级别。</p>
+
+<h4 id="英国">英国</h4>
+
+<p>在英国,地址输入表单通常包含两个地址级别以及一个,两个或三个地址行,具体取决于地址。 完整的地址如下所示:</p>
+
+<p>Frogmarch街103号<br>
+ 上层包装<br>
+ 苏塞克斯<br>
+ TN99 8ZZ</p>
+
+<p>地址级别为:</p>
+
+<ul>
+ <li><code>address-level1</code>: 在这种情况下,该县为“苏塞克斯”。</li>
+ <li><code>address-level2</code>: 在这种情况下,城镇为“上层包装”。.</li>
+ <li><code>address-line1</code>: 房屋/街道详情-“ Frogmarch 街道103号”</li>
+</ul>
+
+<p>邮政编码是分开的。 请注意,您实际上可以仅使用邮政编码和 <code>address-line1</code> 在英国成功发送邮件, 因此它们应该是唯一的必填项,但通常人们会提供更多详细信息。</p>
+
+<h4 id="中国">中国</h4>
+
+<p>中国可以使用多达三个行政级别:省,市和区。</p>
+
+<h2 id="技术指标">技术指标</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">规格</th>
+ <th scope="col">状态</th>
+ <th scope="col">评论</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('HTML5.2', "sec-forms.html#autofilling-form-controls-the-autocomplete-attribute", "autocomplete")}}</td>
+ <td>{{Spec2('HTML5.2')}}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML WHATWG', "form-control-infrastructure.html#autofilling-form-controls:-the-autocomplete-attribute", "autocomplete")}}</td>
+ <td>{{Spec2('HTML WHATWG')}}</td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+<div class="hidden">本页中的兼容性表是由结构化数据生成的。如果您想贡献数据,请查看 <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> 并向我们发送拉请求</div>
+
+<p>{{Compat("html.global_attributes.autocomplete")}}</p>
+
+<h2 id="另请详见">另请详见</h2>
+
+<ul>
+ <li>The {{htmlelement("input")}} 元素。</li>
+ <li>The {{htmlelement("select")}} 元素。</li>
+ <li>The {{htmlelement("textarea")}} 元素。</li>
+ <li>The {{htmlelement("form")}} 元素。</li>
+ <li><a href="/en-US/docs/Learn/HTML/Forms">HTML 表单</a></li>
+ <li><a href="/en-US/docs/Web/HTML/Global_attributes">全球属性</a>。</li>
+</ul>