+ 3
Can someone explain the work of autofocus in html course
3 Answers
+ 3
The element with focus is the one which will get updated with user input.
+ 2
It basically puts a cursor on the input element so the user doesn't have to click on it before typing when the page loads.
+ 1
The use of the"autofocus" attribute is to have the element onto which it is applied gets focus as soon as a page loads. It saves the little trouble of having to move your mouse over form elements and clicking on em before input.
It can also be applied to one element as many elements cannot receive focus at the same time