FrontendDeveloper.in

JavaScript Track Detail

Is it possible to debug HTML elements in console

Yes, it is possible to get and debug HTML elements in the console just like inspecting elements.

const element = document.getElementsByTagName("body")[0];
console.log(element);

It prints the HTML element in the console,

Screenshot