Autofocus Attribute in HTML5

Autofocus Attribute in HTML5

HTML5 removes the need for JavaScript solutions. If a particular input should be “selected,” or focused, by default, we can now utilize the autofocus attribute.

<input type="text" name="txtemailid" placeholder="Please Email id" required autofocus>

Autofocus Attribute in HTML5 Autofocus Attribute in HTML5 Reviewed by Bhaumik Patel on 5:56 AM Rating: 5