Tags like <br/> and our current doctype

Ceri Davies ceri at submonkey.net
Fri Mar 4 14:24:03 GMT 2005


On Fri, Mar 04, 2005 at 01:22:44PM +0100, Devon H. O'Dell wrote:
> On Fri, 2005-03-04 at 11:35 +0000, Ceri Davies wrote:
> > On Fri, Mar 04, 2005 at 12:05:21PM +0100, Devon H. O'Dell wrote:
> > > >From what I recall, tags like <br> are self closing in the HTML 4.0 and
> > > 4.01 doctypes, i.e. <br /> is redundant and confuses (or is supposed to
> > > anyway) the parser into thinking the last tag was closed.
> > > 
> > > However, if I change this to <br>, even with our doctype, it freaks out.
> > > I suppose that the parser doesn't really care what our doctype is, it
> > > just wants the content to be XML-compliant.
> > > 
> > > <br> is XML compliant, if you have the right entity definition.
> > > 
> > > So I see two possible options for the future:
> > > 
> > > 1) Figure out how to make the parser like <br> and keep our current
> > > doctype (or upgrade to HTML 4.01/Strict), or
> > > 
> > > 2) Hop over to XHTML 1.0/Transitional, which will allow us to utilize
> > > features of XHTML (and let us keep <br />, which is valid in XHTML)
> > > while still having our Content-type as text/html (this isn't allowed for
> > > any other XHTML doctype)
> > 
> > #2 is best.  I made a patch ages and ages ago for this (not a full
> > patchset, mind you) that might even vaguely apply still; search the
> > archives for a post from me with a subject containing "XHTML" and you
> > should find it.
> 
> Well, it currently validates as XHTML. Just need to work out a couple
> quirks in the layout :)

index.html does; none of the others do (as I recall).

Ceri
-- 
Only two things are infinite, the universe and human stupidity, and I'm
not sure about the former.			  -- Einstein (attrib.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-www/attachments/20050304/514a9403/attachment.bin


More information about the freebsd-www mailing list