The attribute that is used to set background color of an HTML element is bg color. Depending on the element whose background color is to be set, we use the appropriate tag. The bgcolor attribute can be used with the following tags- body, table, td, th, tr, marquee.
I tried to change background colour and bg-colour tag is used to change it
CodePudding user response:
<html>
<head>
<title>background image</title>
<style>
body{
background: green;
}
</style>
</head>
<body>
This is my text
</body>
CodePudding user response:
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-color: rgb(20,30, 1);
}
</style>
<h1>HTML Articles</h1>
</head>
<body>
</body>
</html>