<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Set background color to an HTML Element using CSS</title>
<!--Internal CSS added-->
<style>
/* html background color has been set to lightpink*/
h1 {
background-color: lightpink;
}
</style>
</head>
<body>
<h1>How to set background color to an HTML element using CSS?</h1>
<p> CSS property <code style="color:blueviolet">'background-color: lightpink;'</code> is applied to the <h1> element to set background color.</p>
</body>
</html>