Click to See Complete Forum and Search --> : img or object?


keenlearner
07-26-2006, 01:53 PM
Hi guys,
I'm currently trying to learn xhtml and have a question about the best way to insert images in my documents. The book I'm reading says that <img> is the most widley used but that the official xhtml specifications had intended for the <object> tag to takes it's place.

Which should I be using in a best practice situation?

Thanks

the tree
07-26-2006, 02:03 PM
Both, the reason that the OBJECT element is non-empty is so that you can put alternate content inside, should the browser not be able to handle it.

pacerier
08-05-2006, 03:00 AM
<img> tag should be sufficient and i haven't come across a browser that don't inteprete img tag, but if you want your code to be "nice", you can try <object><img></object>

ray326
08-05-2006, 11:35 AM
I've got a better idea. Forget XHTML and learn something useful like HTML 4.01 Strict instead.

the tree
08-05-2006, 11:39 AM
<img> tag should be sufficient and i haven't come across a browser that don't inteprete img tag :eek: :eek: Forget XHTML and learn something useful like HTML 4.01 Strict instead.What on earth is the harm in learning both?