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!