HTML Intro

HTML Intro Quiz

HTML Intro Exercise

HTML Basics

HTML Basic Quiz

HTML Basic Exercise

HTML Advance

HTML Advance Quiz

HTML Advance Exercise

HTML Tags List

HTML Global Attributes

HTML Attributes


HTML onfocus Attribute

HTML onfocus Attribute



The onfocus attribute fires the moment that the element gets focused. It is mostly used on input and select elements.


Used With:-


Elements Event
All elements in HTML onfocus




Its syntax is:- < element onfocus="your_script" >

Code Explanation

All Tutorials related to HTML Attributes

All Sections related to HTML