Image replacement is a useful means of putting your heading content in your XHTML file as text, but overlaying an image, so that you still get all the benefits of pretty fonts in your headings without compromising the benefits of screenreader accessibility.

There is a school of thought which says that Image Replacement is a silly idea. (X)HTML does provide for screenreaders and other image-unfriendly devices already. <img> has the alt attribute and <object> has element content. You might be able to justify image replacement if you have concerns about browser support for <object> and if you want to use other then plain text (i.e. markup such as <abbr> which can't exist inside an alt attribute).

Most image replacement techniques suffer from serious accessibility problems for users who turn images off (there are lots of people who have to pay for their internet access by data transferred, not everybody is on unmetered or per second billing, or who just have slow connections) but CSS on.

CSS Image Replacement

FIR

Fahrner Image Replacement (FIR) is the original and uses display: none, but suffers from major accessibility problems. The articles about it are still worth a read to learn about the reasoning behind image replacement in the first place.

Methods that move or hide the text

The nice thing about most of these methods is that they don't require an extra span in the markup. The downside is that when images are off, the user sees nothing. Thus, these methods are not preferred, and should only be used if you need a transparent image.

Examples

Methods that cover up the text

These all work with CSS on and images off, but require the use of extra markup. Most agree this is worth it for the accessibility benefit. The other downside to these methods is that they don't work with transparent images, as the image has to sit over the text.

Combination methods

Summaries

Alternatives to CSS Image Replacement

CSS3 content insertion

Only [CSS3-content] supports native image replacement. Prior to CSS3-content, all the CSS solutions are inherantly fudged and ugly (including the example I wrote).

JavaScript

Flash