Setting the Background Color
Description
We can use background-color
to
set a background color.
Example
The following code sets the Background Color.
<!DOCTYPE HTML>
<html>
<head>
<style type="text/css">
p {<!--from w w w. jav a2s . co m-->
background-color: lightgray;
}
</style>
</head>
<body>
<p>This is a test.<br/ >
This is a test.<br/ >
This is a test.<br/ >
This is a test.<br/ >
This is a test.<br/ >
This is a test.<br/ >
This is a test.<br/ >
This is a test.<br/ >
</p>
</body>
</html>