Re: <caption><h1> nested - Mac BBTidy

mac.bjarnedm@get2net.dk wrote:
>html-tidy@war-of-the-worlds.org wrote:

>> Solution:  don't put H1 inside CAPTION; it can't go there.

>But it works as intended and displayes a 'h1' table caption ???

Because the browsers are fault tolerant... to a fault.  "But it works!"
does not change the specification.  And Tidy conforms to the specification.
If you want an H1 caption, you have to use H1 before TABLE rather than
CAPTION inside TABLE.

>iCab - furthermore - has its own html-checker and doesn't complain about this.

iCab's HTML checker is not a DTD-driven validator, misses a lot, and in
some cases report errors that are not errors.  But it also catches errors
that a validator would not since the DTD is not the sole measure of the
specification.

There's one way to satisfy a DTD-driven validator and allow H1 inside
CAPTION.  That's by using <CAPTION><INS><H1>...</H1></INS></CAPTION>.  INS
(and DEL) can break practically every DTD rule in a strictly DTD-compliant
way, but the full specification says it's a violation to use them that way.
(Effectively, INS and DEL should inherit the content model of their parent,
except where that model and the content model of INS and DEL are disjoint
(e.g., TABLE can contain INS, but INS can't contain anything that you can
put inside TABLE).)

Received on Wednesday, 21 June 2000 11:53:19 UTC