Computer Science, asked by gurpreet4532, 1 year ago

what is the difference between BGCOLOR and BACKGROUND attributes of the <body> tag

Answers

Answered by Anonymous
155

Hi

BGCOLOR is used to set background color of webpage whereas background is used for adding an image as a background for webpage.


Answered by Sidyandex
112

Background-color is used in CSS code or in style tag. e.g.- <body style="background-color:red;">.

Bgcolor is used directly as an attribute of any tag in html. e.g.- <body bgcolor="red">.

The bgcolor was once the correct way to specify the color to be applied to thebackground of a table.

To set the background of a table with CSS, use thebackground-color property instead of the bgcolor HTML attribute.

Similar questions