Computer Science, asked by ayush2623, 11 months ago

what is the difference between BG colour and background attributes of the <body> tag

Answers

Answered by tejaswisingh10pdtgvp
0

bgcolor is an html attribute which is deprecated, meaning it's not supported in html5. Don't use it. This leads us to the second half of your question: background-color is the CSS (stylesheets) alternativ to bgcolor. Imagine you have 100 html documents and you gave them all the same background using <body bgcolor="skyblue">. One day you decided to change it to 'white'. To do that you have to edit all 100 documents! With the background color declared in a stylesheet file which is included in the <head> of all documents, you only need to edit one file. body { background-color:white; }.

Similar questions