<!DOCTYPE html> <html lang="en"> <head> <title>The Autofocus Attribute</title> </head> <body> <form action="#"> Username: <input type="text" name="username" autofocus><br /><br /> Password: <input type="password" name="password"><br /><br /> <hr /> <button type="submit">Login</button> </form> </body> </html>