[ Excessive newsgroup list trimmed in this reply. ]
Nathan,
> I didn't think getting rid of the space before the / was breaking the
> rules of XHTML. Is it?
No need to worry, it is OK to both include or leave out the space before the
"/>" characters.
From the XML 1.1 specification (XHTML is based on XML) published by W3C:
http://www.w3.org/TR/xml11/#sec-starttags
....you may find definition #44, which defines an empty tag like <BR> as
follows:
EmptyElemTag ::= '<' Name (S Attribute)* S? '/>'
Here, "Name" is the name of the tag, i.e. "BR", and "S" stands for a white
space, like a space or tab (one or more). At the end, there's "S?" and
followed with the "/>" characters. The question mark after the "S" is an
occurrence indicator, and means that the white space can exist, or not exist
at all.
So, both "<BR/>" and "<BR />" are correct as far as the specification goes,
but the latter might be a bit easier to read (subjective) whereas the former
takes little less space.
Happy New Year!
--
Regards,
Mr. Jani Järvinen
C# MVP
Helsinki, Finland
http://www.saunalahti.fi/janij/