Welcome to Westonci.ca, the ultimate question and answer platform. Get expert answers to your questions quickly and accurately. Experience the ease of finding accurate answers to your questions from a knowledgeable community of professionals. Join our platform to connect with experts ready to provide precise answers to your questions in different areas.

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.