Posts

Showing posts with the label 2020

Write a program to add a background to web page

Image
How to Implement a Background Image in HTML Background Image In HTML There are various ways in which images can be added to a web page to make it look captivating & appealing. One of such ways is adding background image. In this blog we will understand how we can add background images in a webpage using HTML & CSS. The most common & simple way to add background image is using the background image attribute inside the <body> tag. Example 1 2 3 4 5 6 7 <! DOCTYPE html> < html > < body background = "edureka.png" > < h1 >Welcome to Edureka</ h1 > < p >< a href = "<a href="https://www.edureka.co">https://www.edureka.co</a>" >Edureka.co</ a ></ p > </ body > </ html > The background attribute which we specified in the <body> tag is not supported in HTML5. Using CSS properties, we can also add background im