Re: Validation Question

Laurdag 23. februar 2002 10:07 skreiv Michael Phillips:

> I am trying to validate a file.  I was trying for XTHML transitional but
> am having a problem making it work in NS6/Mozilla (I am having a problem
> getting tables to render properly up with the XHTML doctype - od in
> IE/Opera).

Mozilla (and IE 6) renders the document *correctly* when you use XHTML 
transitional. If it doesn't render as you intended, you have 'bugs' in your 
CSS.

> The validator output is listed below.  Note the insertion of
> the extra body tags that appear to cause the thing to blow up.

That's because the meta element ends with a /, which should only be used in 
XHTML/XML. The validator sees this as character data, which isn't allowed 
in 'head'. In therefor (correctly!) assumes it has reached the end of the 
'head' element (and opened the 'body' element) (as the 'head' and 'body' 
tags (as opposed to the 'head' and 'body' elements') are optional in HTML).

The solution is the remove the / from the 'meta' element.

-- 
Karl Ove Hufthammer

Received on Tuesday, 26 February 2002 06:07:55 UTC