autofocus অ্যাট্রিবিউট একটি বুলিয়ান অ্যাট্রিবিউট। উপস্থিত থাকলে, এটি নির্দিষ্ট করে যে পেজ লোড হলে <input> এলিমেন্টটি অটোমেটিক্যালি ফোকাস পাবে। নিচে একটি উদাহরণ দেওয়া হলো:
<!DOCTYPE html> <html> <body> <form action = "/new.php"> First Name: <input type = "text" name = "fname" autofocus><br> Last Name: <input type = "text" name = "lname"><br> <input type="submit"> </form> </body> </html>