[thelist] Tip: Use Width and Height attributes on IMG tags

Chris Heilmann lists at onlinetools.org
Mon Feb 21 05:33:48 CST 2005

> <tip type="Use Width and Height attributes on IMG tags" author="Francois
> Jordaan">
> Of course 99.9% of you already do so by default, but sometimes sloppy CMSs
> or CMS editing processes can result in these attributes being left off IMG
> tags. Until recently I thought the only downside of this was the page
> rendering in a messy way, with layout shifting as images download.
> However, on CSS-based layouts, this can also cause IE to crash completely.
> If you resize text rapidly using the scrollwheel, it will trigger an error
> in MSHTML.DLL -- tested on IE6 on WinXP on a fast PC.
> </tip>

I also realised that when I turn my screen on an off rapidly the colours
are messed up. The same happens when I pour low-carb sodas in the fan of
my computer while starting Firefox.

But seriously, nothing against the idea of dimensions of images in the
markup, but if you claim something like not adding them does crash a
browser, it needs a bit more test cases than just your computer. Also, it
might be your mouse driver.

Chris Heilmann
Blog: http://www.wait-till-i.com
Writing: http://icant.co.uk/
Binaries: http://www.onlinetools.org/

More information about the thelist mailing list