DOM X-ray Β· the recipe vs the dish

HTML is the recipe you write. The DOM is the dish the browser actually serves β€” a live family tree that JavaScript searches and edits. They are not the same thing.

1 Β· What you wrote (the recipe)

What the student sees

2 Β· What the browser built (the dish)

0elements
0text nodes
0generations deep
document.querySelectorAll( )