+ 1

Hey. How can I use background image in css and linking to html?

I use notepad ++ to use css and html

9th Oct 2017, 2:45 PM
Juan Cronje
Juan Cronje - avatar
2 odpowiedzi
0
To use background image in Html - You can use 2 methods 1. Copy the required image on your desktop. In body tag use "background" attribute then "=" and then the image name along with its extention(.jpg , .png , .gif , etc) in inverted commos. ex- <html> <body background = "image name.extention(.jpg,etc)"> </body> </html> (note - u can get image extention in properties option by right click) 2. Use tag <img src> here src stands for source. Either u can directly put image name with extention as in 1 but only if u have that image on desktop Or u can give the source of image. for ex. if your image is in drive C ; pictures folder. then type..... <body> <img src = " C:\pictures\image name. extention"> </body> thanx......#Ayush Jaiswal
9th Oct 2017, 3:36 PM
Ayush Jaiswal
- 1
Thanx for your effort, but I need background image to code in CSS.... not in html... Do you understand what I'm saying?
9th Oct 2017, 3:41 PM
Juan Cronje
Juan Cronje - avatar