Simon Willison’s Weblog

What data structures are used to implement the DOM tree?

My answer to What data structures are used to implement the DOM tree? on Quora

You may enjoy this post from Hixie back in 2002 which illustrates how different browsers deal with incorrectly nested HTML. IE6 used to create a tree that wasn’t actually a tree! http://ln.hixie.ch/?start=103791...