0

I am confused by selecting the best technique for image replacement in web design.

Here at this weblog some techniques are provided:

http://css-tricks.com/css-image-replacement/

Which technique in image replacement is better?

Why should we use css image replacement when we can use 'alt' attribute of img tag to put some text ?

hd.
  • 17,596
  • 46
  • 115
  • 165

1 Answers1

1

The alt attribute can't handle CSS. Image replacement displays a styled element instead of the image, which is good for image-less (if they exist) people.

As for the "best", I'd say No. 3 is good. No extra markup and no issues. All the other solutions suffer from one or the other.

Blender
  • 289,723
  • 53
  • 439
  • 496
  • i see many use these technique for putting their logo.i think the logo could simply put by img and this alt attribute and no styled element is needed. – hd. Jun 04 '11 at 19:00
  • 1
    Then do what you think. Some like their site to look nice when there are no images. – Blender Jun 04 '11 at 19:14