Optional tags

Hi

The rules for omitting tags (http://www.w3.org/html/wg/drafts/html/CR/syntax.html#optional-tags) are not very clear to me.
What does „[the] element is immediately followed by […]“ exactly mean?

Example:
Is

<p>foo
<p>bar

valid? (there’s a newline after foo)
Or has it to be

<p>foo<p>bar

?
If the first is valid, will the nodeValue of the HTMLParagraphElement.firstChild contain the newline?

Thanks for clarification.

Regards,
Mathias

Received on Tuesday, 21 January 2014 15:15:19 UTC