DEV Community

Discussion on: How web browsers work - parsing the HTML (part 3, with illustrations)📜🔥

Collapse
 
alohci profile image
Nicholas Stimpson

Your diagram of the tokens and nodes is not quite right. The tokenizer doesn't form characters into words and the nodes are not broken into words. So the diagram should look like this:
Parser diagram showing the text content tokenized to individual characters and the 'Hello world!' text in a single node

Collapse
 
arikaturika profile image
Arika O

You are right, for each letter of the word, a token is emitted (I'll correct the diagram a bit later). The node representation was an oversight. Thank you for taking the time to modify the diagram :).