Separate debugging from DOM. I am a beginner on the web, so it is possible with an example of an IDE - this task should definitely be solved there.
Update
Debugger and inspector respectively - if in Mozilla. Elements, Sources - in chrome.
It may be easier to just go to the IDE, but for a simple layout - I had enough browser tools.
Now there is a need to debug - but it is not so convenient in the browser.