Ash987
Ash987

Reputation: 13

Why is my image not displaying ? html

Im using netbeans and calling an image on my desktop. This is my code: <img src ="desktop/SF.jpg" height="300" width="300"> and it is not being displayed! I have tried moving to documents and calling it from there also and still would not work!

Upvotes: 1

Views: 112

Answers (4)

Akramul Hasan
Akramul Hasan

Reputation: 81

Create a new folder and give a name like "myewfolder" and put all your html and css files and also the images inside this newly created folder.

Now update your image code like bellow:

Upvotes: 0

Khan Luke
Khan Luke

Reputation: 168

  1. Could be the extension .jpg or .jpeg
  2. Could b ur folder location. I assume your html file is on the desktop and there's a folder called desktop (also on the desktop) containing your image. The arrangement stated is valid and should work. NB: If the image is on the desktop, remove 'desktop/' from your code and finally have 'src=SF.jpg'

Upvotes: 0

Siful I
Siful I

Reputation: 1932

Checkout the extension its .jpg or .png also check the its capital letter or small letter (.JPG) or (.PNG).

Upvotes: 0

ANURAG GUPTA
ANURAG GUPTA

Reputation: 193

Problem in the link of the image referenced, rest of the code is fine. Write the complete absolute address of desktop. for example. C:/Users/xyz/desktop/image.jpeg.

Upvotes: 1

Related Questions