The autocapitalize attribute specifies that the text entered by the user should automatically be capitalized.
This is a global attribute that can be applied to any tag.
A autocapitalize attribute on an <input> element.
This text field capitalizes the first letter of each word.
<input type="text" autocapitalize="words"
name="subject" value="Website Feedback" />
The autocapitalize attribute specifies how text entered should be automatically capitalized.
It allows capitalization on the first letter of each sentence, or each word, or the entire text input.
Autocapitalization does not work with these <input> types: url, email, and password.
The autocapitalize attribute is a global attribute that can be applied to any tag.
Note: The autocapitalize attribute is now deprecated and is no longer recommended by W3C.
<tag autocapitalize="off | none | on | sentences | words | characters" />
| Value | Description |
|---|---|
| off | none | Text will not be capitalized. |
| on | sentences | The first letter of each sentence will be capitalized. |
| words | The first letter of each word will be capitalized. |
| characters | The entire text will be capitalized. |
Apple introduced the autocapitalize attribute on input and textarea elements in iOS 5.
It indicates how the browser should present the virtual keyboard for users to optimize text entries.
Browser support is limited for this feature.
Here is when autocapitalize support started for each browser:
![]() Chrome
|
43.0 | May 2015 |
![]() Firefox
|
Not supported | |
![]() Edge
|
Not supported | |
![]() Opera
|
Not supported | |
![]() Safari
|
5.0 | Jun 2010 |