[thelist] Why do we say what we say?

kasimir-k kasimir.k.lists at gmail.com
Thu Oct 25 03:00:33 CDT 2007


Tigdh Glesain scribeva in 25/10/2007 4:48:
> <br /> is a required markup 'rule' when using XHTML

Actually, not quite correct. XHTML requires that all elements, also 
empty ones, must be closed. You can close an empty element in two ways:
- including both opening and closing tags: <br></br>
- closing the opening tag with '/>': <br/>

Note that XHTML does NOT require space there.

Space is recommended however, if you wish HTML user agents to be able to 
render the document - eventhough, as others have pointed out, nobody has 
seen a browser choking on a spaceless empty element :-)

W3C's guidelines on this: <http://www.w3.org/TR/xhtml1/#C_2>

If you wish to have some more in depth information on the subject: 
<http://www.cs.tut.fi/~jkorpela/html/empty.html>

.k



More information about the thelist mailing list