background colours code example

Example 1: css background color

body {
  background-color: green;
}

Example 2: background color using css

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

Example 3: background color

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

Example 4: background color

document.getElementById('id').style.backgroundColor = 'green' ;

Example 5: how to edit colours in background html

<html>
  <body style="backgroung:red">
  <body>
</html>

Tags:

Misc Example