How do I add images to my HTML code on my phone? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

How do I add images to my HTML code on my phone?

I know it's <img src="...but that's all I know. I need a code that works with the mobile version of this app. Because the codes I've been using just don't work...I need help.

1st May 2017, 1:04 AM
Derek Gist
Derek Gist - avatar
9 Answers
+ 15
you must upload your image on internet and copy the url to your code. there are many free image hosting like tiny pic. You can check my code for the example. i made it last night. it should work fine on html. (ignore the php tag) just learn the <img> tag. https://code.sololearn.com/wbNxr4RWHo3u/?ref=app
1st May 2017, 1:40 AM
Agus Mei
Agus Mei - avatar
+ 7
Keep your image and the HTML code in 1 File ExampleDirectory >hey.png >hello.html -hello.html <!DOCTYPE html> <html> <head> <title>picture</title> </head> <body> <img src="hey png" /> </body> </html> There you go
1st May 2017, 1:20 AM
Complex
Complex - avatar
+ 6
@Derek Gist is your code kept in a file or is your code on SoloLearn?
1st May 2017, 1:53 AM
Complex
Complex - avatar
+ 2
Here's my code: <!DOCTYPE html> <html> <head> <title>picture</title> </head> <body> <img src="scrapbook_1402609861251.png" /> </body> </html> That didn't work. I feel like I'm missing a step here. That's the name of the picture in my phone...I'm not sure what else I'm missing here.
1st May 2017, 1:41 AM
Derek Gist
Derek Gist - avatar
0
Its on Sololearn
1st May 2017, 3:09 AM
Derek Gist
Derek Gist - avatar
0
You can use two method to insert image in your html code. 1.Upload your image on any website, copy link and paste it in your code. 2. By Using 'ES File explorer'(you can use other), (i)First, open your image's 'properties' (ii)click on 'copy full path' Again, (i) create a file and rename it with extension '.txt' (example.txt) (ii)click on it and open with 'Es Note Editor' (iii)paste path of image inside <img src="paste here "> and save file (iv)Again, Rename file with extension '.html'(example.html) (v)click on it and open with your browser (firefox/chrome) Now, you can see your image in output of your code. Example <!DOCTYPE HTML> <html> <head> <title>Adding image</title> </head> <body> <img src="/storage/emulated/0/Download/image.jpg"/> </body> </html>
1st May 2017, 3:29 AM
Anmol kumar
Anmol kumar - avatar
0
I need help here i am using acode editor, i have been trying to add image to my code, i have tried all that is said here yet it didnt work. What else can i do?
6th Feb 2021, 7:55 PM
Goodluck S. Johnny
Goodluck S. Johnny - avatar
0
How to upload an image html code with sololearn app by mobile
23rd Sep 2022, 12:01 PM
Mahim Sarder
Mahim Sarder - avatar
0
I want to insert my photo in my html code but I can't how can I do this
24th Mar 2024, 7:49 AM
tewodros kassa
tewodros kassa - avatar