Re: <br> and top-margin

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 "/>"

http://w3.org/TR/xhtml1/#h-4.6

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

http://w3.org/TR/xhtml1/#C_2
 
> 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