code:
<a href="https://www.amazon.in/" target=_main> <img src="th.jfif" alt="website" width="100"></a>
Why am I not able to see any image here to open amazon? NOTE: image is saved as th.jfif on my desktop and not in any folder
was expecting to see the image
CodePudding user response:
The issue you are having is very likely due to your image not being in the correct location from where your img
is expecting it to be.
I would say take the image from your desktop and place it in a folder, maybe called site
. Then put your HTML file and image file in the same site
folder and load your page again. Then your path mapping should be accurate and your image will render.
I say it is your path mapping because rendering your HTML link using an online image works just fine.
<a href="https://www.amazon.in/" target="_blank"> <img src="https://turnerduckworth.com/sites/default/files/styles/case_study_single_image_s_2x/public/2019-03/5_Amazon_Lettermark_2560.jpg?h=a92f03cd&itok=2nBmNv14" alt="website" width="100"></a>
CodePudding user response:
Surely this is to do with having no file or folder structure. Your image and web page must be detailed relatively to each other.
<img src=" path to the image from the web page location ">
If your web page has a folder with it called images
and inside it are all your.... images.
The path will be
src="images/picture-title.jpg"
Read about file structure. To begin with, put your web page inside a folder of it's own and also in that folder create an images
folder.