What is the focus attribute in html5
This article mainly explains "what is the focus in html5?". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn "what is the focus in html5?"
In html5, the focus is the "autofocus" attribute, which is a Boolean attribute that states that the input element should automatically get focus when the page loads; if you use the autofocus attribute, the input element will get focus.
The operating environment of this tutorial: windows7 system, HTML5 version, Dell G3 computer.
In html5, the focus is on the "autofocus" attribute. This property is a new property in HTML5.
The autofocus property is a Boolean property.
The autofocus attribute states that the input element should automatically gain focus when the page loads.
If you use this attribute, the input element gets focus.
Syntax:
Note: in XHTML, property minimization is prohibited, and the autofocus property must be defined as.
Example:
User name:
Secret code:
At this point, I believe you have a deeper understanding of "what is the focus in html5". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!