+ 1
Can an img tag have two alternates?
Can you have two alternates. For example if the first image can not be retrieved and the second alternate image can not be retrieved then can you have a third alternate with an "image not found" prompt?
4 Réponses
+ 3
No.
You can only have 1 alt attribute for a tag.
+ 3
yes you can do it by using scripts
in javascript image.onload tells whether the image was loaded or not if not you can set its SRC by image.src=.... then call it again image.... alt attribute is not for alternative image it is alternative text
for prompt there is alert("image not found')
+ 2
I think it can't.
+ 1
Thanks Sandeep