Live Demo & Try it yourself!
Output
Set background color for two different elements | Styles
<!DOCTYPE html>
<html>
<head>
<title>Set Background Color For Two Different Elements</title>
</head>
<body>
<h1 style="background-color:powderblue;">CSPunjab.Com</h1>
<p style="background-color:tomato;">Computer Science, Punjab</p>
</body>
</html>