![]() |
VOOZH | about |
The HTML autofocus attribute is a powerful tool that enhances user experience by automatically setting the focus to a specific element when a webpage loads.
Syntax:
<input type="text" autofocus> Note: This attribute is boolean, meaning it can either be present or absent.
Note: It is important to note that only one element per document can effectively have the autofocus attribute. If multiple elements include autofocus, the first one in the DOM (Document Object Model) will receive focus