diff --git a/files/en-us/web/html/element/form/index.md b/files/en-us/web/html/element/form/index.md index fbd1cec2cf7a531..74de684188c2546 100644 --- a/files/en-us/web/html/element/form/index.md +++ b/files/en-us/web/html/element/form/index.md @@ -24,16 +24,26 @@ This element includes the [global attributes](/en-US/docs/Web/HTML/Global_attrib > **Note:** **This attribute has been deprecated and should not be used.** Instead, use the [`accept`](/en-US/docs/Web/HTML/Element/input#accept) attribute on `` elements. - `accept-charset` + - : Space-separated {{Glossary("character encoding", "character encodings")}} the server accepts. The browser uses them in the order in which they are listed. The default value means [the same encoding as the page](/en-US/docs/Web/HTTP/Headers/Content-Encoding). (In previous versions of HTML, character encodings could also be delimited by commas.) -- `autocapitalize` {{non-standard_inline}} - - : A nonstandard attribute used by iOS Safari that controls how textual form elements should be automatically capitalized. `autocapitalize` attributes on a form elements override it on `
`. Possible values: +- `autocapitalize` + + - : Controls whether text entered into the form is automatically capitalized on mobile browsers and, if so, in what manner. The possible values are: + + - `none` or `off` + - : Do not automatically capitalize any text. + - `sentences` or `on` + - : Automatically capitalize the first character of each sentence. + - `words` + - : Automatically capitalize the first character of each word. + - `characters` + - : Automatically capitalize every character. + + > **Note:** When `autocapitalize` is set on a ``, it controls the autocapitalization behavior of all contained {{htmlelement("input")}} (except `url`, `email`, and `password` types) and {{htmlelement("textarea")}} elements, overriding any `autocapitalize` values set on contained elements. - - `none`: No automatic capitalization. - - `sentences` (default): Capitalize the first letter of each sentence. - - `words`: Capitalize the first letter of each word. - - `characters`: Capitalize all characters — that is, uppercase. + > **Note:** Where `autocapitalize` is not specified, the adopted default behavior varies between browsers. Chrome (Android) and Safari (iOS) default to `on`/`sentences`, while Firefox (Android) defaults to `off`/`none`. - `autocomplete` diff --git a/files/en-us/web/html/element/input/index.md b/files/en-us/web/html/element/input/index.md index ee74f125456d102..61599feabdc03df 100644 --- a/files/en-us/web/html/element/input/index.md +++ b/files/en-us/web/html/element/input/index.md @@ -321,6 +321,7 @@ Attributes for the `` element include the [global HTML attributes](/en-US | --------------------------------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | [`accept`](#accept) | `file` | Hint for expected file type in file upload controls | | [`alt`](#alt) | `image` | alt attribute for the image type. Required for accessibility | +| [`autocapitalize`](#autocapitalize) | all except `url`, `email`, and `password` | Controls text capitalization in mobile browsers. | | [`autocomplete`](#autocomplete) | all except `checkbox`, `radio`, and buttons | Hint for form autofill feature | | [`capture`](#capture) | `file` | Media capture input method in file upload controls | | [`checked`](#checked) | `checkbox`, `radio` | Whether the command or control is checked | @@ -365,6 +366,23 @@ A few additional non-standard attributes are listed following the descriptions o - : Valid for the `image` button only, the `alt` attribute provides alternative text for the image, displaying the value of the attribute if the image [`src`](#src) is missing or otherwise fails to load. See the {{HTMLElement("input/image", "image")}} input type. +- `autocapitalize` + + - : Controls whether text entered into input fields is automatically capitalized on mobile browsers and, if so, in what manner. This attribute does not affect the `url`, `email`, or `password` input types, where autocapitalization is never enabled. The possible values are: + + - `none` or `off` + - : Do not automatically capitalize any text. + - `sentences` or `on` + - : Automatically capitalize the first character of each sentence. + - `words` + - : Automatically capitalize the first character of each word. + - `characters` + - : Automatically capitalize every character. + + > **Note:** `autocapitalize` can be set on `` and {{htmlelement("textarea")}} elements, and on their containing {{htmlelement("form")}} elements. When `autocapitalize` is set on a `` element, it sets the autocapitalize behavior for all contained inputs (except `url`, `email`, and `password` types) and `