1024programmer HTML5 What is the attribute of the body element for the background color

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

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

  • color_name specifies the color value The background color for the color name (eg “red”).

  • hex_number specifies the background color of the hexadecimal value (eg “#ff0000”).

  • rgb_number specifies that the color value is the background color of the rgb code (e.g. “rgb(255,0,0)”).

Note:

In HTML 4.01, the bgcolor attribute of the body element is deprecated; in XHTML 1.0 Strict DTD, the body element’s bgcolor attribute.

CSS is recommended instead.

CSS syntax:

The above is the body For more details about the attributes used by elements for the background color, please pay attention to other related articles on 1024programmer.com!

This article is from the internet and does not represent1024programmerPosition, please indicate the source when reprinting:https://www.1024programmer.com/what-is-the-attribute-of-the-body-element-for-the-background-color-2/

author: admin

Previous article
Next article

Leave a Reply

Your email address will not be published. Required fields are marked *

The latest and most comprehensive programming knowledge, all in 1024programmer.com

© 2023 1024programmer - Encyclopedia of Programming Field
Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us