Re: Margin attributes not accepted by XHTML 1.0 & impossible to validate CSS

Lachlan Hunt wrote:
> 
> Benoit Quemar wrote:
> 
> > My draft page here can only be validated with XHTML 1.0 if I REMOVE 
> > the two topmargin & left margin attributes within the <body> tag:
> 
> You mean body element, it's not a tag.
> http://lachy.id.au/log/2004/12/html-tags

Well, it was approximately correct (or at least sufficiently 
descriptive) in the first place. The attributes are within the body 
start-tag, which could reasonably be described as the <body> tag (with 
the body end-tag reasonably described as the </body> tag).

If a completely unambiguous phrasing is required, "within the body 
start-tag" or "of the body element" are most advisible - merely changing 
'tag' to 'element' still leaves it ambiguous, as the attributes of its 
child elements are also 'within' that element.

> > http://altamedia.ca/home/index2b.htm
> 
> You can use CSS to set the margins instead.
> 
> body { margin-top: 0; margin-top: 0; }

This is missing units and repeats margin-top. A corrected version:

body { margin-top: 0px; margin-left: 0px; }

Regards,
Grant Husbands.

Received on Tuesday, 12 April 2005 10:46:31 UTC