Westonci.ca offers fast, accurate answers to your questions. Join our community and get the insights you need now. Get quick and reliable solutions to your questions from a community of experienced experts on our platform. Get quick and reliable solutions to your questions from a community of experienced experts on our platform.

Suppose a webpage contains a single text field. We want to make the page such that a user can immediately start typing in the text field without clicking on it. What is correct way using?
1. .
2. .
3. .
4. Can't be done with only HTML5, need help of Javascript or something else.


Sagot :

Answer:

The answer is "Option 2".

Explanation:

In HTML5, text inputs use an autofocus attribute, which, when the page is loaded, uses a template to concentrate primarily on text fields. This attribute is a Boolean property that represents the HTML autofocus attribute, showing if the related <select> element will receive an output focus whenever the page loads if it is overruled by the user. An only form-associated entity can have this property specified in a text.