+ 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!
13 Respostas
+ 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
+ 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
+ 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
+ 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
+ 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 ^^
+ 1
Use dropbox .
upload your image to dropbox and then you can convert your image to link
0
but I want to put img from my PC
0
I tried to use
<img src=“1.jpg” />
but ther is no picture, when I open browser
0
Oh yea!!! Ths, now it working
You know I wrote this code on PC, not in sololearn
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
0
https://code.sololearn.com/W31yUH8jlhP6/?ref=app
- 1
Put src to reachable url oky mr