+ 1

How to change bg image in HTML5

17th Oct 2020, 4:28 PM
Aayush
Aayush - avatar
4 Antworten
+ 2
Hey there! In the css of the element, to which you want to add the bacjground image, put background-image: url('imagename.jpg'); Example: If i want to add an image as background foe the entire body of the page then, body{ background-image: url('banner.jpg'); } Also as </𝚜𝚌𝚘𝚛𝚙𝚒𝚘𝚗> has mentioned , please complete the CSS course first and the use the search bar. If you still can't find the answer then ask a question.
17th Oct 2020, 4:38 PM
Vatsal Sharma
Vatsal Sharma - avatar
+ 2
Thanks ok I am learning html then css
17th Oct 2020, 5:41 PM
Aayush
Aayush - avatar
17th Oct 2020, 4:32 PM
</𝚜𝚌𝚘𝚛𝚙𝚒𝚘𝚗>
</𝚜𝚌𝚘𝚛𝚙𝚒𝚘𝚗> - avatar
0
Here is an example where you can live see how to change the background: https://code.sololearn.com/WLpJTMTqV4Bl/?ref=app
17th Oct 2020, 8:27 PM
JaScript
JaScript - avatar