Computer Applications

Gagandeep has written the following code to display an image in the background of HTML document :
<BODY BgGround = "Animals.jpeg">
but he is not getting the desired output. Help him in identifying correct code from the following :

  1. <BODY Bg = "Animals.jpeg">
  2. <BODY BACK = "Animals.jpeg">
  3. <BODY BGIMAGE = "Animals.jpeg">
  4. <BODY BACKGROUND = "Animals.jpeg">

HTML Intro

2 Likes

Answer

<BODY BACKGROUND = "Animals.jpeg">

Reason — "bgGround" is not an attribute of <BODY> tag. Background attribute of <BODY> is used to display an image in the background of HTML document.

Answered By

3 Likes


Related Questions