Here's the problem:
HTML Document Location- G:\html files\projects\htmlforms\index.html
Image Location- D:\resources\images\stock images\logo.jpg
Is this some folder permission problem ?
I've tried- <img src="file:///D:/resources/images/stock images/logo.jpg" alt="image">
I am just expecting an simple image to be display
Here's the problem:
HTML Document Location- G:\html files\projects\htmlforms\index.html
Image Location- D:\resources\images\stock images\logo.jpg
Is this some folder permission problem ?
I've tried- <img src="file:///D:/resources/images/stock images/logo.jpg" alt="image">
I am just expecting an simple image to be display
Share Improve this question edited Nov 19, 2024 at 20:31 divaura asked Nov 19, 2024 at 20:30 divauradivaura 12 bronze badges 2 |1 Answer
Reset to default -1I'm pretty new to HTML and CSS myself, but from what I know, the image has to be in the same folder and have the .html in the image's file name. It should be relatively simple to move the image's location, so no need to stress there. It will also help to shorten the image's link. Here's an example tag:
<(img src="cvpfp.html.jpeg" alt="Profile Picture">
(Please don't include the parentheses in the tag, that just helps it show up on stack overflow) In this case, I had emailed the image to myself from my phone and downloaded it. my source consists of the file name, the document type, and the image type.
I really hope this helps! Please let me know if I can clarify anything or answer any other questions.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742400205a4436759.html
file:///G:/html files/projects/htmlforms/index.html
then it should just work (I just tried). However if you open the HTML file through a local web server using something likehttp://localhost/ .. .. .. /index.html
then the browser will block everything that uses afile:
URL for security reasons. You simply can not usefile:
from a page hosted on a web server. – Peter B Commented Nov 19, 2024 at 22:44