| |
|
Different techniques to set background image on different HTML element? Question Posted on 06 Feb 2023 Home >> WEB >> HTML Questions >> Different techniques to set background image on different HTML element? |
Different techniques to set background image on different HTML element?
Below are the different HTML element to set a background image:-
(1)Below is the inline technique to set image on paragragh element of element
Use Style sheet to set background images on HTML elements by using this in head section or external CSS files.
(2)Set Background image on the entire page by using Body element. By using different style sheets by using repeat attachment size extra many properties example.
Use of cover to set background-size property to cover, Using background-attachment property to fixed. Background image will cover the entire element, with no stretching
To resize the browser window and we will see that the image will stretch, but always cover the entire element.
| |
|
|
|
|