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

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

WBOY
WBOYforward
2023-09-08 18:05:021898browse

在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 = "".

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!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete