Zaloguj | Zarejestruj | FAQ
Anonymous

<img src> not working

+ Odpowiedz

Posty: 2 Strona 1 z 1


<img src> not working

przez KnownAsDon » So wrz 16, 2017 2:53 pm

Hello everyone,this is my first post in this forum page and id like to ask a question.So i am new to programming and it has been a while now since ive started learning html.Well every time i have coded i seemed to have a problem.My images wont load what so ever.At first when this happened i was coding with notepad,i did a simple script like:
<html>
<head>
<body>
<h1>Hello World</h1>
<img src="The link of the image" alt="Hello World"/>
</body>
</head>
</html>

and when i dragged the file in the browser everything was fine except no picture was loaded.At first i though it was a small bug so i tried to download the image and put its path instead of the link and that didnt work either,i tried to put the complete path that didnt work either,i tried to drag the picture to the browser(which actually loaded it)and copy its path and paste it to the img src and that didnt work either.Than i tried to put both the index.html file and the pic in the same folder and tried all the above solutions and that didnt work either.Than i downloaded atom and tried everything i said above but in atom and that didnt work too.Than i tried the same thing i did with atom but in brackets thinking that its live preview would solve my problem but that didnt work either!!!!I am pretty sure the pic is not corrupted cause i have tested it and the same thing seem to happen with all the pics i try.They will load in the browser if u drag and drop them but they wont load in the .html file.I have tried all the above tries in ubuntu linux 16.04 LTS 64 bit and in a windows 7 starter 32 bit and in none of them it works.So please help me i have searched all around the web and nothing seem to help me so i had nothing else to try left rather than to upload my problem to a forum page and this is the best one i found about this topic,so please help me i would gladly apprushiate it.Oh and btw i am not that good english speaker so sorry for my grammar.Thank you.
Avatar użytkownika

KnownAsDon

  • Posty: 1
  • Dołączył(a): So wrz 16, 2017 2:41 pm

Re: <img src> not working

przez Kalleb » Śr wrz 20, 2017 10:49 pm

Well, I'm not a specialist, I'm just a beginner like you are, but from the code that you showed I see 2 critical issues:

1. there are no <figure></figure> tags above and below <img src> (open and close).
2. there is no extension of file, such as .jpg, .png, .gif in the name of your picture.

Plus, extra dash at the end of alt="Hello World"/>.

And in overall </head> tag is placed incorrectly (as far as I understand)...

Hope this helps. Good luck! :)
Avatar użytkownika

Kalleb

  • Posty: 1
  • Dołączył(a): Śr wrz 20, 2017 10:40 pm


+ Odpowiedz

Strona 1 z 1