Setting the style of an HTML element, can be done with the style attribute.
HTML Background Color
The background-color property defines the background color for an HTML element.
This example sets the background color for a page to light grey:
<html>
<head><title>HTML Style Attribute</title></head>
<body style="background-color:lightgrey;">
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>