Adscend

Click Here



Click Here



Click Here

9.9.13

Background Color Code


Background Color


Use Color as background
Syntax:
background-color: <value>
The background-color property sets the background color of an element.

Example: 1
<html>
<head>
<style type="text/css">
body
{
background-color:#1078E1;
}
</style>
</head>
<body>
</body>
</html>

Another Way:
<html>
<head>
<style type="text/css">
.background
{
background-color:#1078E1;
}
</style>
</head>
<body class="background">
</body>
</html>
Output
Whole background is filled with the #1078E1 color.

Example: 2
<html>
<head>
<style type="text/css">
h4 { background-color:#009999;}
p { background-color:#A0A0A0; }
</style>
</head>
<body>
<h4>This is a heading.</h4>
<p>This is a paragraph.</p>
</body>
</html>
Output

This is a heading.

This is a paragraph.