VOOZH about

URL: https://www.geeksforgeeks.org/html/html-dom-activeelement-property/

⇱ HTML DOM activeElement Property - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML DOM activeElement Property

Last Updated : 11 Jul, 2025

The DOM activeElement property is used to return the currently active elements in the HTML document. This property is read-only. It gives the reference of a focused element object in the document. 

Syntax:

document.activeElement

Return Value: A reference to the element object in the document that has a focus.

Example: In this example, we will use  DOM activeElement property.

Output:

👁 Image

Supported Browsers: The browser supported by DOM activeElement property are listed below: 

Comment
Article Tags: