+ 16
Can anyone describe a scenario where alt atribute can be set to an empty value?
3 odpowiedzi
+ 8
When you have an image with only visual value, that is only meant to make the design better but isn't relevant to the content ( like a banner ..etc). It would be better to set it to an empty value, as reading it will be useless.
+ 5
One possible scenario is where you set an image as the background of a block. Having an alt value here could mess up the readability of the content in the foreground. In such situations though, it makes more sense to use css to set the image instead of img element. If the alt attribute isn't required, you probably don't need to use the img element there. There is no hard and fast rule for this though, it's just an aspect of good design to avoid meaningless stuff in your webpage. The final choice however, depends on personal preference.
+ 5
vaccuum