HTML | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 10

HTML

Please; How do I use the <img/> tag to insert pictures? The pictures; can they be inserted only from the web or locally from ones phone. If so, how?

26th Apr 2019, 1:19 PM
Chioma Paul
Chioma Paul - avatar
47 Answers
+ 2
Chioma Paul , 'pathtoimage' means the address or path of the image which you want to display from the stored entity (eg: hard disk or cloud)
26th Apr 2019, 4:07 PM
Atharva Kadegaonkar
Atharva Kadegaonkar - avatar
+ 7
<img src="img Location/png or jpg/>
13th Feb 2020, 6:11 PM
Chukwuemeka Uche
Chukwuemeka Uche - avatar
+ 5
<img src= "paste image link here" alt/> [Hope it will help you]. :)
22nd Jul 2020, 3:29 AM
Priya Sharma :)
Priya Sharma :) - avatar
+ 4
Its the way that the browser locate where is the image in your computer For example if your image is not in the same folder with the html file that you want to use and let's say its in another folder named "image" (that folder should be inside the main folder with the html file) You type <img src="image/nameofimage.formatofimage" /> and you can use the "." Before image if the image is in another place in your computer (out of the main folder) I hope that helped.
26th Apr 2019, 2:12 PM
ox titanium
ox titanium - avatar
+ 4
Ok you are good to go <img src= " the link comes here " alt/>
26th Apr 2019, 8:51 PM
Danyo Joe Crews Kumi Junior
Danyo Joe Crews Kumi Junior - avatar
+ 4
<img src="o.png" alt="something" width="100%" />
8th Jun 2021, 7:44 AM
Tharul Nejana
Tharul Nejana - avatar
+ 3
Its very simple .. you write the code in any text editor and you save it as .html
26th Apr 2019, 2:21 PM
ox titanium
ox titanium - avatar
+ 3
Upload to a cloud server and then download to local
27th Apr 2019, 5:02 AM
Sanjay Kamath
Sanjay Kamath - avatar
+ 3
Example For web <img src="http://blablablaimage.com"/> For local assuming u are using localhost <img src="../image.jpg"/> Depending on the text editor of you put the quote it will show a popup box to locate the image file. i use dreamweaver
27th Apr 2019, 12:17 PM
Mufungo Geeks
Mufungo Geeks - avatar
+ 3
you must upload your picture to a website and get url adress of that. <img src="url adress and code" alt="#"/>
29th Apr 2019, 7:33 PM
Zoughi-Javad
Zoughi-Javad - avatar
+ 3
In sololearn playground, yes you need to upload your pictures first. But when you are using your text editor and browser, you can use the local files
15th Sep 2019, 1:34 PM
I Love You (Challenge Me In C++)
I Love You (Challenge Me In C++) - avatar
+ 3
<img src="link of image">
4th Oct 2019, 11:41 AM
Sever Trifunovic
Sever Trifunovic - avatar
+ 3
<img src= "put the link here">
8th Aug 2020, 5:40 AM
Sakshi💕
Sakshi💕 - avatar
+ 2
<img src="pathtoimage"> You can find lots of examples on the web to handle <img>
26th Apr 2019, 1:22 PM
Hans D
Hans D - avatar
+ 2
Only web?
26th Apr 2019, 1:24 PM
Chioma Paul
Chioma Paul - avatar
+ 2
You can use a local path on a phone or whatever. But if you copy the HTML to an other phone for example, it may not work. Be careful, if you use it local.
26th Apr 2019, 1:32 PM
Hans D
Hans D - avatar
+ 2
<img src='' "> Is the simplest method
30th Oct 2019, 12:13 PM
Master Genius [ INACTIVE ]
Master Genius [ INACTIVE ] - avatar
+ 2
<img src="download 1.jpg"/> <img src="image link (location,path)/image name . image type ">
11th Jun 2020, 12:42 PM
SurajGuptaOnline
SurajGuptaOnline - avatar
+ 1
Generally , if you are creating code in the sololearn or any other app, it can't access images on the phone.. you have to upload to a webhost e.g like Dropbox or Google drive and use its link I think... But if you are creating a code in a local note editor app , then it may detect the image locally...
26th Apr 2019, 2:05 PM
Nishil Saluja
Nishil Saluja - avatar
+ 1
Oooh no, no I haven't.
26th Apr 2019, 2:27 PM
Chioma Paul
Chioma Paul - avatar