changing background color html code example

Example 1: how to make a background color in html

<body style="background-color: #fff">
  <!---this will change the body color---!>

</body>

Example 2: html change background color

<!DOCTYPE html>
<html>
<body style="background-color:powderblue;">

</body>
</html>

Example 3: html change background color of page

<body bgcolor="some color">
 HTML goes here
</body>

Example 4: how to change the background in html

<body style="background-color: anything you want">
	[insert 10000 lines of code here]
  
</body>

Example 5: html color changing background

@keyframes bgcolor {
    0% {
        background-color: #45a3e5
    }

    30% {
        background-color: #66bf39
    }

    60% {
        background-color: #eb670f
    }

    90% {
        background-color: #f35
    }

    100% {
        background-color: #864cbf
    }
}

body {
    -webkit-animation: bgcolor 20s infinite;
    animation: bgcolor 10s infinite;
    -webkit-animation-direction: alternate;
    animation-direction: alternate;
}

Tags:

Css Example