Using <object> for images

Go back to CSS Tutorial

This page needs to be viewed in both Internet Explorer and Firefox (and maybe Opera and Safari) to demonstrate the interrelationship between <object> and <img> elements and the variable implementation for the feature. Use View | Source to see the code behind the page.

You should NEVER use the <img> element to display images which are not one of the three native image formats.

.bmp file using object

BMP files cannot be viewed on this web browser using the <object> element

.bmp file using img

Original image - using img

.bmp file nested

Original image - using img
This image is being displayed using a fallback <img> element

.wmf file using object

WMF files cannot be viewed on this web browser using the <object> element

.wmf file using img

Original image - using img

.wmf file nested

Original image - using img
This image is being displayed using a fallback <img> element