semanticist at gmail.com
Tue Jul 10 02:39:56 CEST 2007
On Jul 9, 4:30 am, Nick Craig-Wood <n... at craig-wood.com> wrote:
> Marc 'BlackJack' Rintsch <bj_... at gmx.net> wrote:
> > On Sun, 08 Jul 2007 22:23:20 +0200, Jan Danielsson wrote:
> > > Firefox is very unhappy about the textarea not having separate
> > > opening and a closing tags. i.e. I need this:
> > Then either Firefox is broken or you don't declare your XHTML properly and
> > Firefox thinks it's HTML.
> I suspect the former - we noticed exactly the same thing (can't
> remember which tags we were having problems with), using the
> declaration :-
> <?xml version="1.0" encoding="iso-8859-1"?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> I haven't tested this again recently though.
Firefox is not broken. The XML prolog and DOCTYPE do not affect HTML
vs. XHTML interpretation--only the Content-Type does. If you are
serving a page as "text/html", which you almost certainly are, then
all browsers will parse it as HTML, regardless of prolog and doctype,
and HTML does not support self-closing tags. You need to serve the
page as "application/xhtml+xml", or avoid self-closing tags on
elements other than <img>, <br>, <link>, etc.
More information about the Python-list