The basic options for logging an HTML Element using JavaScript are for instance described in [Wayback/Archive] google chrome – How can I log an HTML element as a JavaScript object? – Stack Overflow (thanks [Wayback/Archive] Ben Flynn for asking and [Wayback/Archive] Mathias Bynens for answering)):
Useconsole.dir:var element = document.documentElement; // or any other element console.log(element); // logs the expandable <html>…</html> console.dir(element); // logs the element’s properties and values
Both log all html or all properties even though often these are enough (most via [Wayback/Archive] Element – Web APIs | MDN):





