encyclopegia.org

CSS image replacement

CSS image replacement is a dated web design technique that uses Cascading Style Sheets – as opposed to other technologies, like Flash – to replace text on a web page with an image containing that text. It is intended to keep pages accessible to users of screen readers, text-only web browsers, or other browsers where support for images or style sheets was either disabled or nonexistent, while allowing the image to differ between styles. One of many techniques was the Fahrner image replacement, named after Todd Fahrner, who was credited with the idea of image replacement in 2003. With the introduction of CSS web font support in all major web browsers, CSS image replacement is now little used.

CSS image replacement is a dated web design technique that uses Cascading Style Sheets – as opposed to other technologies, like Flash – to replace text on a web page with an image containing that text. It is intended to keep pages accessible to users of screen readers, text-only web browsers, or other browsers where support for images or style sheets was either disabled or nonexistent, while allowing the image to differ between styles. One of many techniques was the Fahrner image replacement, named after Todd Fahrner, who was credited with the idea of image replacement in 2003. With the introduction of CSS web font support in all major web browsers, CSS image replacement is now little used. Sample Headline Through style sheets, the heading was then given a background containing the desired image, and the <span> hidden by setting its display CSS property to none : firHeader { width: 300px; height: 50px; background: #fff url(firHeader.gif) top left no-repeat; } firHeader span { display: none; } It was soon discovered, however, that this method caused some screen readers to skip over the heading entirely, as they would not read any text that had a display property of none . The later Phark method, developed by Mike Rundle in 2003, instead used the text-indent property to push the text out of the image's area, addressing this issue: firHeader { width: 300px; height: 50px; text-indent: -5000px; /* ← Phark */ } The Phark method had its own problems, however; in visual browsers where CSS was on but images off, nothing would display. Also in 2003, Dave Shea's eponymous Shea method solves both of the issues earlier mentioned, at the cost of an extra <span> : Revised Image Replacement By absolutely positioning an empty <span> over the text element, the text is effectively hidden. If the image fails to load, the text behind it is still displayed. For this reason, images with transparency cannot be used with the Shea method. header { width: 329px; height: 25px; position: relative; } header span { background: url(firHeader.gif) no-repeat; position: absolute; width: 100%; height: 100%; } Over a dozen different methods has since been developed with varying degree of compatibility and complexity.

References

No reference rows published for this article.

Cite this article

MLA

"CSS image replacement." encyclopegia.org, 2026, https://encyclopegia.org/wiki/css-image-replacement. Accessed 24 November 2026.

Chicago

"CSS image replacement." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/css-image-replacement.

APA

encyclopegia.org. (2026). CSS image replacement. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/css-image-replacement

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

replacement value

stub · references available

image compression

stub · references available

Replacement Army

stub · references available

opioid replacement therapy

stub · references available

Prussian Heritage Image Archive

stub · references available

image analysis

stub · references available

image fusion

stub · references available

image reproduction

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1372871544 · 0.5 · snapshot enwiki-001372871544

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.