The DOM HTML model

Hmm..

 I just read the DOM Specification through and a question came to my
head:

 If I have understood correctly the documents being altered with
the DOM model are being parsed and put into a tree-like structure so that
e.g.

<DIV><H1>Heading</H1><P>Some text and a <IMG SRC="Image"></P><P>More
text</P></DIV> 

Would be a tree with the DIV-element as it's root
DIV: H1, P(1), IMG, P(2)
H: "Heading"
P(1): "Some text and a"
IMG: "Image"
P(2): "More text"


Now to the question... How would the following HTML be parsed?

<P>How would <B>This</B> be parsed?</P>

is it 
a) 
P: "How would", B, "be parsed?"
B: "This"

or 

b)
P: "How would <B> this </B> be parsed?"

...
Heikki Vesalainen * hvesalai@cc.hut.fi * http://www.clinet.fi/~wes
		 It's Not Here - Wisdom is Above!

Received on Monday, 25 May 1998 09:12:13 UTC