HTML CSS examples for HTML Tag:input
You can select which input element the browser focuses on when the form is displayed.
You specify which input element the focus should be applied to with the autofocus attribute.
Using the autofocus Attribute
<!DOCTYPE html> <html> <head> <title>Example</title> </head> <body> <form method="post" action="http://example.com/form"> <p> <label for="fave"> Fruit: <!--from ww w. jav a2 s. c o m--> <input autofocus id="fave" name="fave"> </label> </p> <p> <label for="name"> Name: <input id="name" name="name"> </label> </p> <button>Submit Vote</button> </form> </body> </html>