+ 1

How to put img in HTML?

So I wrote a code … <img scr=“NameOfMyPicture” /> … But in browser I don’t see it Help me please!

6th Jul 2021, 7:55 AM
Матвей Барканов
Матвей Барканов - avatar
13 odpowiedzi
+ 7
still a lot asked and answered question ^^ the src (not scr) provided is relative to the html file location, so relative to sololearn server... you must put absolute url to your image, hosted on internet if you want avoid be the only user with the only device able to view it ;P
6th Jul 2021, 7:59 AM
visph
visph - avatar
+ 3
ABSOLUTE url is required, relative url do not work in sololearn context ^^ if you open your html file locally, the image must be located in the same folder as your html file ;P
6th Jul 2021, 8:23 AM
visph
visph - avatar
+ 3
If you want to use image in sololearn,you can have a look at it: https://www.sololearn.com/post/459751/?ref=app https://code.sololearn.com/Wy3lrXNwGsgJ/?ref=app Kindly,Next time please use the search bar: https://www.sololearn.com/post/10362/?ref=app
7th Jul 2021, 5:13 PM
The future is now thanks to science
The future is now thanks to science - avatar
+ 2
Make sure that src points to a correct raw image url (mostly end wih .jpg or .pnd ect..) an example : <img src="https://ychef.files.bbci.co.uk/1600x900/p07ryyyj.webp"> notice that its remote file(file from any server which you can access on any device) and its extension is .webp
6th Jul 2021, 8:03 AM
Prashanth Kumar
Prashanth Kumar - avatar
+ 1
so use the absolute path of your image preceeded by the file:// protocol (instead of http://)... but only your pc will be able to display the image ^^
6th Jul 2021, 8:03 AM
visph
visph - avatar
+ 1
Use dropbox . upload your image to dropbox and then you can convert your image to link
7th Jul 2021, 7:05 AM
Tharul Nejana
Tharul Nejana - avatar
0
but I want to put img from my PC
6th Jul 2021, 8:01 AM
Матвей Барканов
Матвей Барканов - avatar
0
I tried to use <img src=“1.jpg” /> but ther is no picture, when I open browser
6th Jul 2021, 8:21 AM
Матвей Барканов
Матвей Барканов - avatar
0
Oh yea!!! Ths, now it working You know I wrote this code on PC, not in sololearn
6th Jul 2021, 8:27 AM
Матвей Барканов
Матвей Барканов - avatar
0
you could also use relative path from the html file folder: src="imageFolder/image.jpg" imageFolder must be in the folder of the html file src="../image.jpg" image must be in the parent folder of the html file folder
6th Jul 2021, 8:31 AM
visph
visph - avatar
11th Jul 2021, 8:50 AM
Divya Mohan
Divya Mohan - avatar
0
https://code.sololearn.com/W31yUH8jlhP6/?ref=app
26th Aug 2021, 9:23 AM
Rehan
Rehan - avatar
- 1
Put src to reachable url oky mr
7th Jul 2021, 8:45 AM
Frank J Abel
Frank J Abel - avatar