In the past, I extensively used CSS image replacement techniques for SEO purposes and to separate presentation from content.
But from my reading of the Google Webmaster guidelines and other comments recently, I'm starting to question whether it is better to use <img> with alt attributes in most cases, reserving CSS image replacement for cases where there isn't an alternative.
For example, I'm trying to display a 'badge' image showing the ISO9001 certification of a client. Am I right in concluding that the best approach would be to mark up something like...
HTML:
<div class="accreditationItem">
<h4>ISO9001 Accreditation</h4>
<p>Quality ISO 9001 Certified System</p>
<p>FM 999999</p>
<img alt="Quality ISO 9001 Certification - FM 999999"
src="iso9001-badge.jpg"/>
</div>
CSS:
div.accreditationItem h4, div.accreditationItem p {
display: none;
}
srcrather thanhrefin your<img>tag. – Alasjo Jan 10 '12 at 9:35display:nonerule applied to it - we've had to "hide" stuff by using themargin-left: -1000pxmechanism or similar (456bereastreet.com/archive/201108/…) – Zhaph - Ben Duguid Jan 13 '12 at 13:22imgis visible and has analtproperly set, which a screen reader would read, right? – Alasjo Jan 13 '12 at 14:54