• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Setting Background Images

In HTML, the BODY element's BACKGROUND attribute is used to set a background image for a page. That attribute has been deprecated in HTML 4 and XHTML 1 in favor of using styles to achieve the same or better results. In CSS, the background-image property is used to specify an element to be displayed in an element's background. I've included a background image, paper.gif, with the example files that you can use to try this out, although you can substitute any lighter colored background image you want to use. To apply a background image to your page, edit your style sheet codes as shown here (see Figure 6.7):

body {  color: rgb(153,0,0); background-color: rgb(255,255,204); background-image:
						url("paper.gif"); }


					  


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint