tags:

views:

53

answers:

2

I've just discovered that using <div /> instead of <div></div> completely destroys my page in IE8. Even though I only had the empty tag syntax in one single place, half the page didn't even render.

Is this a bug in IE8 or is this correct standards implementation? I'm astounded if this is correct behaviour and Microsoft have deliberately been this strict.

A: 

This is a doctype issue. Depending on what type is set, closing tags in themselves is forbidden, allowed or mandatory. What doctype have you set?

Pekka
DTD XHTML 1.0 Transitional, though I admit I don't really know what any of that means :)
fearofawhackplanet
Doctypes don't do anything but switch between Standards, Almost standards and Quirks modes.
Ms2ger
+3  A: 

In HTML 4 the Div tags closing tag is required.

http://www.w3.org/TR/html401/struct/global.html#h-7.5.4

Check your standards :)

Pete Duncanson