skip to Main Content

I want to insert an image in HTML and I’m sure about the path but it won’t show pic.

code as below.

<img src = C:UsersStefDesktopCapture.jpg>

Please guide me for solve it.

2

Answers


  1. Read This: https://www.w3schools.com/html/html_images.asp

    <img src="C:UsersStefDesktopCapture.jpg">
    

    Actually you should put images inside a folder inside your project folder instead of Desktop

    Login or Signup to reply.
  2. HTML uses the Unix convention of forward slashes (/) for folder paths, even if you’re running on Windows. Using a backslash () is open to being misinterpreted, especially if you also forget to put the src in quotes.

    Assuming that there really is an image at that location, a more correct version would be:

    <img src="C:UsersStefDesktopCapture.jpg" alt="Capture Image>
    

    The alt attribute is the text which should be used if the image can’t be seen. Reasons why the image can’t be seen include that the URL is wrong, or the image has been removed, or the user is blind.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search