...

View Full Version : Semantics



Ibanez
05-27-2009, 08:17 AM
Hi all!

I have a quick question, which is semantically more correct:
Placing an image like this <div><img src="" alt="" title="" /></div>
Or by using CSS as background-image?

I really want to form good habits over here...

thanks!

abduraooft
05-27-2009, 09:56 AM
I have a quick question, which is semantically more correct:
Placing an image like this <div><img src="" alt="" title="" /></div>
Or by using CSS as background-image? That surely depends on your requirement.
If that image is for styling your page, then it should be served as a background.
If that image has some other purpose in your document, say a logo, title, icon, picture to be displayed in a gallery page or in a profile page etc, then it should be served as an img, so as to be visible even in the naked css (http://naked.dustindiaz.com)

VIPStephan
05-27-2009, 03:38 PM
This is a cross post. Please don’t do this, Ibanez. You should know this by now!
The other post (with more replies) is located at http://codingforums.com/showthread.php?t=167327

abduraooft
05-27-2009, 03:51 PM
This is the first one and found the other one after posting here :(



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum