Skip to content
doubtly
Chapter: Practice Questions· ComputerApplications

Gagandeep has written the following code to display an image in the background of HTML document:

Gagandeep has written the following code to display an image in the background of HTML document:

<BODY Bg Ground= “Animals.jpeg">

but he is not getting the desired output. Help him in identifying correct code from the following

a.<BODY Bg= “Animals.jpeg”>

b. <BODY BACK= “Animals.jpeg”>

c. <BODY BGIMAGE= “Animals.jpeg”>

d. <BODY BACKGROUND= “Animals.jpeg”>

Doubtly Asked Updated Student doubt Save WhatsApp Report

2 answers

Answer: d. <BODY BACKGROUND="Animals.jpeg">

The BACKGROUND attribute of the <BODY> tag sets an image as the background of the web page. Gagandeep wrote "Bg Ground", which is not an attribute, so the browser ignores it.

Bg, BACK and BGIMAGE are not valid attributes either. (Do not confuse it with BGCOLOR, which sets a background colour, not an image.)

Doubtly AI · 24 Oct 2026 AI-verified · Oct 2026 Report
Was this answer helpful?

Practise this chapter

Practice Questions

Your answer

Log in or create a free account to answer this question.