What is the attribute used to set the background color of the body element in html?

烟雨青岚
Release: 2020-06-20 16:42:05
Original
11101 people have browsed it

What is the attribute used to set the background color of the body element in html?

#What is the attribute used for the background color of the body element in html?

#The attribute of the body element used to set the background color is bgcolor.

Syntax:

The bgcolor attribute is used to specify the background color of the document

Example:



W3School.com.cn

HTML Tutorial

Copy after login

Compatibility Notes

In HTML 4.01, the use of the bgcolor attribute of the body element is deprecated; in XHTML 1.0 Strict DTD, the body element is not supported bgcolor attribute.

Please use CSS instead.

CSS syntax:

Recommended tutorial: "HTML Tutorial"

The above is the detailed content of What is the attribute used to set the background color of the body element in html?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!