Get the App
SLTechnology News&Howtos  ›  Development  › 

How to set the color of body by css

Shulou Source: shulou.com Published: 2022-06-02 19:19:22 10月05日 Update

This article mainly shows you "css how to set the color of body", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "css how to set the color of body" this article.

Css set body color method: 1, use "body {color: color value;}" statement to set the font color of body; 2, use "body {background-color: color value;}" statement to set the background color of body.

The operating environment of this tutorial: windows7 system, CSS3&&HTML5 version, Dell G3 computer.

Css sets the font color of body

Body {color: palevioletred;} Test text

Effect picture:

Description:

The color attribute specifies the color of the text.

This property sets the foreground color of an element (in the HTML representation, the color of the element's text); the raster image is not affected by color. This color is also applied to all borders of the element unless overridden by border-color or some other border color attribute.

Css sets the background color of body

Body {background-color: paleturquoise;} Test text

Effect picture:

Description:

The background-color property sets the background color of an element. The background of the element is the total size of the element, including fills and boundaries (but excluding margins).

The above is all the content of the article "how to set the color of css body". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Color text test element attribute background content article font effect effect statement border learning help raster image size that is tutorial Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Apple Shulou Tech Info macOS Microsoft