Check out example codes for "backgroud color css". It will help you in understanding the concepts better.

Code Example 1

body {
  background-color: green;
}

Code Example 2

/* To apply color to background you have to use 'background-color' property and value of property is color name. */
html,body {
  background-color: blue;
}

Code Example 3

background-color: blue;

Code Example 4

//javascript type css:
document.body.style.backgroundColor = "blue";
// or inline css:
<div style="background-color: blue;"></div>

Code Example 5

body {
  background-color: lightblue;
}

Code Example 6

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

Learn ReactJs, React Native from akashmittal.com