Using div as img tag
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <style type="text/css"> div.slide { width: 500px; height: 468px; background-image: url(http://java2s.com/style/logo.png); background-repeat: no-repeat; } .slide img { width: 500px; height: 468px; } </style> </head> <body> <div class="slide"> </div> </body> </html>