0 votes
in JavaScript by
Is it possible to debug HTML elements in console in Javascript?

1 Answer

0 votes
by

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

...