The background-color CSS property sets the background color of an element, either through a color value or the keyword transparent.


    background-color: red
    background-color: rgb(255, 255, 128)
    background-color: hsla(50%, 33%, 25%, 0.75)
    background-color: currentColor
    background-color: transparent
    background-color: #bbff00

    background-color: inherit


Is a CSS <color> that describes the uniform color of the background. Even if one or several background-image are defined, this color can be affect the rendering, by transparency if the images aren’t opaque.

        <title>CSS Tutorials</title>
            .One {
                background-color: teal;
                color: white;
            } .Two {
                background-color: rgb(153, 102, 153);
                color: rgb(255, 255, 204);
            } .Three {
                background-color: #777799;
                color: #FFFFFF;
        <p class="One">
            First Style
        <p class="Two">
            First Style
        <p class="Three">
            First Style