<?xml version = "1.0"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <title></title> <style type="text/css"> #h2 { position: relative; width: 250px; height: 76px; overflow: hidden; } #h2 span { position: absolute; width: 250px; height: 76px; left: 0; top: 0; background: url("http://www.java2s.com/style/logo.png") no-repeat; } </style> </head> <body> <h1>Text Replacement</h1> <h2 id="h2" >Heading 2<span>This is a span.</span></h2> </body> </html>