<title /> bug in Internet Explorer

Just thought I would bring along my experience on this little known bug in Internet Explorer. I wrote a little test page the other night, and tried validating it. The W3C Validator complained that the XHTML head tag must have a title tag, and so I just made a blank title tag (without content) in normal, quite valid, XML like this: <title />

This should be exactly the same as writing <title></title>, just shorter, something both Firefox and the W3C validator agreed on. But Microsoft Internet Explorer thought otherwise and gave me a blank page! It actually took me more than a day before figuring it out. I though it had someting to do with the CSS all along, and just figured it out by coincidence. Hope someone out there will find this useful …

Ett svar til <title /> bug in Internet Explorer

  1. Carl-Erik sier:

    Just read that IE7 uses a HTML 4 parser even for the XHTML, which is why legal XML as the above doesn’t work.

Legg igjen en kommentar

Fyll inn i feltene under, eller klikk på et ikon for å logge inn:

WordPress.com-logo

Du kommenterer med bruk av din WordPress.com konto. Logg ut / Endre )

Twitter picture

Du kommenterer med bruk av din Twitter konto. Logg ut / Endre )

Facebookbilde

Du kommenterer med bruk av din Facebook konto. Logg ut / Endre )

Google+ photo

Du kommenterer med bruk av din Google+ konto. Logg ut / Endre )

Kobler til %s

%d bloggers like this: