Reputation: 71
I have a logo that i am trying to make appear in my html page. For some reason it wont appear on my webpage. When i loud my webpage all i see is a square box with an x on it were the picture should be.
<img src="/images/DigitalMonster-logo.png" />
That is the code im using to have the picture display from my hard drive. Any reason why it wont show up on my website? Also if you need the full html code let me know i will provide it thankyou.
Upvotes: 5
Views: 65011
Reputation: 11
Check this steps its working for me:
HTML syntax of html
path name
file name
extension of image
sample syntax:
<img src= "drivename:\foldername\filename.png">
Example:
<img src= "E:\Web_development\baby.png">
Here
"E" is the drive name "Web_development" is the folder name "baby" is image name "png" is extension name
Upvotes: 1
Reputation: 1
If the images folder is in the same directory as your html file then your path will be images/DigitalMonster-logo.png
instead of /images/DigitalMonster-logo.png
Upvotes: 0
Reputation: 11
Upvotes: -2
Reputation: 927
Path /images/DigitalMonster-logo.png assumes you have images directory in very top of Document Root (absolute path). if you will change /images/DigitalMonster-logo.png to images/DigitalMonster-logo.png, this will assume your images directory is in current working directory, (relative path).
Upvotes: 5
Reputation: 1156
You need to check if the web navigator is getting the image back, if you are using chrome press ctrl+shift+i and go to Network tab, than reload your page if you are getting status 200 for /images/DigitalMonster-logo.png that means that the web navigator is receiving the image but not showing it, if status is 404 that means that the path to the image is incorrect
Upvotes: 7