autocapitalize - HTML: HyperText Markup Language 编辑
The autocapitalize
global attribute is an enumerated attribute that controls whether and how text input is automatically capitalized as it is entered/edited by the user. The attribute must take one of the following values:
off
ornone
: No autocapitalization is applied (all letters default to lowercase)on
orsentences
: The first letter of each sentence defaults to a capital letter; all other letters default to lowercasewords
: The first letter of each word defaults to a capital letter; all other letters default to lowercasecharacters
: All letters should default to uppercase
The autocapitalize
attribute doesn’t affect behavior when typing on a physical keyboard. Instead, it affects the behavior of other input mechanisms, such as virtual keyboards on mobile devices and voice input. The behavior of such mechanisms is that they often assist users by automatically capitalizing the first letter of sentences. The autocapitalize
attribute enables authors to override that behavior per-element.
The autocapitalize
attribute never causes autocapitalization to be enabled for an <input>
element with a type
attribute whose value is url
, email
, or password
.
Specifications
Specification | Status | Comment |
---|---|---|
HTML Living Standard The definition of 'autocapitalize' in that specification. | Living Standard |
Browser compatibility
BCD tables only load in the browser
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论