RE: tidy vs block structure

What you're running into is that BLOCKQUOTE is a block element, while TT is
an inline element. Inline elements can't contain block elements according to
my understanding of the formal HTML 4.0 spec. 

cheers,
~stuart 

-----Original Message-----
From: Peter Kaiser [mailto:kaiser@acm.org]
Sent: Saturday, December 04, 1999 2:13 AM
To: html-tidy@w3.org
Cc: kaiser@acm.org
Subject: tidy vs block structure


I'm puzzled at tidy's behavior on some HTML, of which this is typical,
where my intent is for "<tt>" to apply to all the text inside the
outer block, including within the inner block:

	<blockquote><tt>Indented one level.
		<blockquote>Indented two levels.</blockquote>
	Second 1-level indent.</tt></blockquote>

To my naive eye, this looks okay, but tidy (30.11.99) declares

	Warning: missing </tt> before <blockquote>
	Warning: inserting implicit <tt>
	Warning: inserting implicit <tt>

and changes it to

	<blockquote><tt>Indented one level.</tt>
		<blockquote><tt>Indented two levels.</tt></blockquote>
	<tt>Second 1-level indent.</tt></blockquote>

Tidy complains similarly about <pre> ... <Hn> ... </Hn> ... <pre>,
saying that <pre> must be closed before <Hn> and reopened after it.

Do those two kinds of nesting violate the current standard?  (If they
do, then my emotional response is "then what's the purpose of nested
structures at all?")

___Pete

Received on Monday, 6 December 1999 11:49:37 UTC