HTML DOM activeElement Property


The DOM activeElement property helps us find which element is currently active on a webpage. This feature only allows us to read information and can't be changed. It shows us the focused element on the webpage. 

Syntax: 

document.activeElement

Return Value: A mention of the focused element in the document.

Example: In this instance, we'll work with something called the "DOM activeElement property."