Heya,

> I thought it wouldn't come as a surprise that using XHTML makes no
> sense...

Hey, HTML and CSS make no sense, let alone XHTML.  But that's OT. :-)
I'm just saying, the doctype that seems to be recommended is XHTML
transitional, so that's what I use as I don't have a strong reason for
doing anything else, and in the XHTML transitional doctype, <br/> is
correct and I'm guessing requires less work from the browser.

But of course, you're right that if you don't specify any doctype or
if you specify an HTML doctype, you want <br>.  I don't know if that's
going to be 99% of the time, but it's going to be a big number.

The take away for the OP is:  Use a doctype (just about any doctype),
and then use <br> or <br/> depending on what doctype you're using.

-- T.J. :-)

On Jun 14, 6:08 pm, kangax <kan...@gmail.com> wrote:
> On Jun 14, 4:15 am, "T.J. Crowder" <t...@crowdersoftware.com> wrote:
>
> > Hi,
>
> > Isn't the recommended doctype when using Prototype xhtml
> > transitional?  <br> doesn't validate in xhtml transitional, it has no
> > closing tag.
>
> I thought it wouldn't come as a surprise that using XHTML makes no
> sense <http://hixie.ch/advocacy/xhtml>. I know that Rails blindly uses
> XHTML. I remember Mislav mentioned that the issue was brought up on
> Rails mailing list but that noone seemed to care <http://
> mislav.uniqpath.com/rails/cargo-culting-xhtml-considered-harmful/>
>
> I'm not sure about recommended doctype, but I know that Prototype most
> likely doesn't work when served and parsed as application/xhtml+xml.
> Object model of documents parsed as XML is different: from what I
> remember, `document.write` doesn't work, `innerHTML` parser works
> differently, etc.
>
> All of the Prototype's unit tests use XHTML doctype, but fail to set
> proper content-type response header. This means that browsers are told
> to *parse and render page as HTML*, but are actually being served a so-
> called xhtml tag soup <http://en.wikipedia.org/wiki/Tag_soup>, which
> they simply correct into proper HTML (this correction also takes time,
> of course, but I'm not sure if it's significant). I personally have
> never seen Prototype tests run as real XHTML, so I can't be sure that
> it works.
>
> [...]
>
> --
> kangax
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to