Local image doesn't work on markdown with <img - html

I'm trying to use markdown to generate a documentation. When i use <img alt="IMAGE ALT TEXT HERE" width="240" height="180" border="10" src='http://img.youtube.com/vi/YOUTUBE_VIDEO_ID_HERE/0.jpg'/> it's working and it shows the image but when i put <img alt="IMAGE ALT TEXT HERE" width="240" height="180" border="10" src='test.jpg'/> doesn't work although the image test.jpg is on the same folder with the mardown file.
I want to use <img because i want to align my image to the center !

The first one
<img alt="IMAGE ALT TEXT HERE" width="240" height="180" border="10" src='http://img.youtube.com/vi/YOUTUBE_VIDEO_ID_HERE/0.jpg' />
works because the image source is from img.youtube.com
The second one
<img alt="IMAGE ALT TEXT HERE" width="240" height="180" border="10" src='test.jpg'/>
has a local stored image source from your computer. As far as I know it is not only enough to enter the name of the picture but you must also write in your path.
Try something like this (example)
src="C:\Users\YourPCName\Documents\YourSaveFolder\test.jpg
Please note that you have to change the path accordingly when uploading to a webspace/server in general.
Let me know if it works!
Cheers,
Kevin

Related

Why does my alt tag not work at showing a description when hovering the image?

I've tried both the longdesc and the alt tag to make it so a description of the image appears when hovering it but none of them seem to work.
Any idea what to do since none of the tags seem to work.
My code currently looks like this:
<div align="center">
<img src="placeholder.jpg" width="900" height="300" alt="Placeholder">
</div>
The alt attribute stands for alternative text when the image doesn't load for any reason. The correct attribute you are looking for is title.
<img src="placeholder.jpg" width="900" height="300" title="Placeholder">

Images won't load in HTML

I'm trying to load an image called ion.png but it won't load. I have it in the same folder as my index.html file. Any ideas? Thanks.
<img src=“ion.png” width="100" height="80" alt="My Pic">
Don't use MS Word as your html editor:
<img src=“ion.png” width="100" height="80" alt="My Pic">
^-------^---
Those are not valid quotes. Use " or '. Not the typographic 6's and 9's.
You are not using the right quotes here: img src=“ion.png”
It should be img src="ion.png" width="100" height="80" alt="My Pic"
Check the file image permissions if you are absolutely sure the path is correct. Ideally you want an image permission of either 644 or 755 (see more information about why at http://forums.cpanel.net/f185/why-644-755-unix-permissions-ideal-files-directories-public-folders-136821.html)
You can change image permissions through ftp, command line, or even on your computer (on mac for example, in the finder, right click the image and go to info)
Hope that helps!

How to avoid img error icon

If you give an src and it cannot find the img it usually appears a square with a X. Is there any way to avoid that? I mean if it cannot find the img, just show nothing
You can check your solution here:http://jsfiddle.net/GmBax/
HTML:
<img src="1.png" width="42" height="42" >
There's another option, you can load a default empty image on error. Ex: <img src="/img.jpg" onerror="this.src='/none.jpg'" />
put in an "alt" and a "title" tag - this way if the image doesn't show, the alt text will show instead.
e.g.
<img src="1.png" width="42" height="42" alt="hello" title="hi">
Use the alt parameter for example.. You can either add a text or leave it empty.
<img src="1.png" width="42" height="42" alt="" />
Or handle it by some PHP or whatever you're using.

image attributes appearing priority

<img src="#" alt="abc"/>
after above code rendered in browser the position of alt and src are changed like
<img alt="abc" src="#"/>
Is there is any way to fix these problem
"I want that every time src comes before others attributes!"

How do I solve this issue in IE7?

When I am testing my page in IE7, all the image have a tooltip corresponding to the text of the alt in the image tag..
<img src="Myimage.jpg" alt="No pic" />
When I hover my mouse on the displayed pic in IE7, I get a tooltip "No pic" corresponding to the text of the alt .How do I fix this ?
IE6/7 treats the alt attribute as though it was a title attribute - but only if there's no actual title attribute set.
You can workaround it with a blank title:
<img src="Myimage.jpg" alt="No pic" title="" />
You can try adding an empty title tag
<img src="image.jpg" alt="nopic" title="" />
The answer has been posted already (empty title tag).
However, (in reference to one of the answers) alts are supposed to describe the image for 508 compliance reasons and if the image doesn't show up, so you should change the alt text to describe your picture.
I would have made a comment on the original post but SO doesn't allow me to yet.
The actual question here is why are you using alt the way you are? If your image is simply decorative, you should have an empty alt attribute. look at the W3CS definition of the alt attribute.
http://www.w3.org/QA/Tips/altAttribute
On this occasion is suspect youd actually want:
<img src="Myimage.jpg" alt="" />