Home > Web Front-end > HTML Tutorial > In HTML5, is it 'autofocus' or 'autofocus'?

In HTML5, is it 'autofocus' or 'autofocus'?

WBOY
Release: 2023-09-08 18:05:02
forward
1892 people have browsed it

在HTML5中,是"autofocus"还是" autofocus"?

As stated by w3.org -

The autofocus property is a boolean property. The presence of a Boolean attribute on an element represents a true value, and its absence represents a false value.

If the attribute is present, its value must be the empty string or a case-insensitive ASCII match to the attribute specification name, without leading or trailing spaces.

In HTML, using boolean attributes with or has no value. For W3C, autofocus can easily be written as autofocus or autofocus="autofocus", or,

autofocus = "".
Copy after login

The above is the detailed content of In HTML5, is it 'autofocus' or 'autofocus'?. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template