Small example using a "proper" xhtml DTD.

This will work in all browsers but NS4 will not show a proper background-color because of the missing layer-background-color in the stylesheet.

The output for NS4 will not validate because of the name attribute added to images, but then again NS4 is the only browser that will see that (NS4 also writes all tags upper-case when you use document.write). You can see the NS4 output here.

The output for Opera will not validate either because I have to use border="0" on the image tags. You can see the Opera output here

The output for IE4 and IE5 (and IE5.5 and IE6 if you don't use dom creation) will validate. You can see the output here

The output for the DOM browsers is a little worse to display. But if your using mozilla you can try the dom inspector on this page.

You have to view source on the source pages to see the actual output. The script creation is removed so the pages will not work.