+ 1

Html

How to add background image in html

20th Aug 2024, 7:50 AM
Abel Meseret
Abel Meseret - avatar
6 Answers
+ 7
Use background-image property of css. background-image:url(image_url);
20th Aug 2024, 9:02 AM
Gulshan Mahawar
Gulshan Mahawar - avatar
+ 5
"But it didn't work" is not informative. If you want help, show your code.
20th Aug 2024, 10:10 AM
Lisa
Lisa - avatar
+ 5
Abel Meseret you need to put Image URL between brackets which you want to put as background
20th Aug 2024, 11:02 AM
Alhaaz
Alhaaz - avatar
0
But it didn't work
20th Aug 2024, 9:03 AM
Abel Meseret
Abel Meseret - avatar
0
If you want to apply background image to a whole page you can use inline style attribute: <body style='background-image:url(https://url-to-your-image);'></body> Here we use url() function to provide background-image CSS propetry with url value of necessary mage.
21st Aug 2024, 5:30 PM
Lazy Dev
Lazy Dev - avatar
0
Use background-image property of css. background-image:url(image_url); Try this too If you want to apply background image to a whole page you can use inline style attribute: <body style='background-image:url(https://url-to-your-image);'></body> Here we use url() function to provide background-image CSS propetry with url value of necessary mage. Hehe You can try this gud luk
22nd Aug 2024, 1:47 AM
Znyx
Znyx - avatar