In HTML how img tag use to put pic in background?? And this work wil be happen in phone. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

In HTML how img tag use to put pic in background?? And this work wil be happen in phone.

20th Jul 2020, 9:12 AM
Atul Verma
Atul Verma - avatar
5 Answers
+ 1
From Web, just copy link address by right clink and use it... For a valid url link of device memory files: First you need to upload image to a cloud site like Dropbox if your image is in your mobile. It won't access local storage.. So upload and then copy that link and paste as src value. It can't directly from your mobile. Link need absolute path. Can't access your local storage. Follow this link to know how upload and import to Program.. Or you can try by a valid link from copying any Web image link. Ex : try this, a valid link <img src="https://i5.walmartimages.com/asr/b90f8177-2668-49ea-8d99-c33e903fe4d2_1.95df665db8e2aaa09ec381263859b392.jpeg"/> Run this codes and see steps to follow to upload images: https://code.sololearn.com/Wy3lrXNwGsgJ/?ref=app https://code.sololearn.com/WW6t4B73kJVz/?ref=app To add as background image : Use the valid url again : You can add it 3 ways : 1) by html inline style... 2) by internal styling... 3) by external css method.... Below next, i added an example....
20th Jul 2020, 12:30 PM
Jayakrishna 🇮🇳
+ 1
To add as background image, see below link: Use valid url as above specified : To directly add in html, add it in body tag, or in head tag: <style> body { background-image: url("http://www.sololearn.com/uploads/css_logo.png"); background-repeat : no-repeat ; } </style> https://www.sololearn.com/learn/CSS/1104/?ref=app
20th Jul 2020, 12:30 PM
Jayakrishna 🇮🇳
0
Thank you🙏
20th Jul 2020, 12:36 PM
Atul Verma
Atul Verma - avatar
0
Nikky Verma You're welcome.. [ the post, I copy pasted from my previous answers, and also edited for clarity.. So If any thing is I missed, not relavent or understandable pls reply...] Happy coding..
20th Jul 2020, 1:16 PM
Jayakrishna 🇮🇳
0
Jaya Krishna Yaa I understand that Answer
20th Jul 2020, 2:00 PM
Atul Verma
Atul Verma - avatar