How to change background color in HTML?

 So to change the background in HTML you have to write an attribute inside the tags. The attribute that we will use is bgcolor attribute.


 <body style="background-color:"> 

<html>

<head>

<title> MY NAME </title>

</head>

<body style="background-color:pink">

Hello everyone!! my name is Esha Rautela!!<br><hr>

I study in grade 8.<br><hr> 

:)<hr>

</body>

</html>



(NOTE- Instead of writing the name of the color you can use the color code as well).

Comments

Popular posts from this blog

How to add a link in HTML?

What is HTML?

LIST THE REASONS FOR THE FAILURE OF 1857 REVOLT.