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

王林
Release: 2020-07-11 09:54:50
Original
15452 people have browsed it

The attribute used by the body element for background color is bgcolor. The bgcolor attribute is used to specify the background color of the table. Syntax structure: [ ], where color_name indicates that the specified color value is the background color of the color name.

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

The attribute bgcolor of the body element is used for the background color.

(Recommended tutorial: html tutorial)

Attribute introduction:

bgcolor attribute is used to specify the background color of the table.

Grammar structure:

Copy after login

Attribute value introduction:

  • color_name Specifies that the color value is the background color of the color name (such as "red" ).

  • hex_number specifies the background color whose color value is a hexadecimal value (such as "#ff0000").

  • rgb_number specifies the color value as the background color of the rgb code (such as "rgb(255,0,0)").

Note:

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

It is recommended to use CSS instead.

CSS syntax:

Copy after login

The above is the detailed content of What is the attribute of the body element used for background color?. 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!