W3C home > Mailing lists > Public > www-validator@w3.org > September 2004

Re: <br> and top-margin

From: David Dorward <david@dorward.me.uk>
Date: Thu, 30 Sep 2004 13:35:59 +0100
To: Deon Meyer <dmeyer@centricity.co.za>
Cc: www-validator@w3.org
Message-ID: <20040930123559.GA21149@us-lot.org>

On Thu, Sep 30, 2004 at 02:28:40PM +0200, Deon Meyer wrote:
> How should I use the <br> tag in xhtml.
> I get errors if I only use <br>. If I change it to <br/> then the errors are
> gone. Is <br/> a legal tag or attribute.

Yes, and no.

In XHTML empty elements with no end tag must end the start tag with "/>"


However, the format you use violates the HTML compatability guidelines:

> Where should I put the top-margin="0".

Nowhere. You should use CSS for presentational detail like that.

David Dorward                                      http://dorward.me.uk
Received on Thursday, 30 September 2004 12:36:01 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:42 UTC