Don't think you can give code to an <img />.
You need the url of the image.
About the first.It won't really matter what you will see on your own PC. Better test it on a server and see the behavior there.