How to add a background color and background Image in HTML?

Background Color


Step 1  Open Notepad

Step 2  Write the code
 
<html>
<title>
welcome</title>
<body  bgcolor="pink"" >

<h1> hello  </h1>

friends

</body>

</html>

Step 3  Save as background.html.

Step4  Open the save file where you save the file ie Desktop, document etc)

as shown in fig















Background Image

Step 1  Open Notepad

Step 2  Write the code
 
<html>
<title>
welcome</title>
<body  background="image.jpg" >


<h1> hello  </h1>

friends

</body>

</html>

Step 3  Save as background.html.

Step4  Open the save file where you save the file ie Desktop, document etc)

as shown in fig






















Share this

Related Posts

Previous
Next Post »