css background color code code example

Example 1: css background color

body {
  background-color: green;
}

Example 2: background color css

html,body {
  background-color: red;
}

Example 3: cool ways to color a background with css

background: linear-gradient(110deg, #fdcd3b 60%, #ffed4b 60%);

Example 4: css set background color

body {
	background-color: red; 
}

Example 5: 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 6: background color in hex css

<style>
div {
    background-color: #ffffff; /* add # infront of the hex code */
    color: #ffffff; /* add # infront of the hex code */
}
</style>

Tags:

Css Example