Use of HTML ALT tag in Php

Mostly in web development we don’t need the alt text option for images.Because it can be simply neglect to use by Programmers.But incase if we have an image loading error for a specific server then server has to response the error with specific Id or name to client or a tester.
Simply I can give an example: Say If the user enabled the text-only option on his/her browser because of the slow internet .Then the image can’t be shown there therefore we are using ALT as a best Practice.
we can use alt in many ways as mentioned bellow,


Decorative image or meaning less:If we use the image as bullet,symbols and spacer then we can leave the space as it is
Here we can the leave the ALT text as it is .Simply non-text Because we don’t need to tag a name a for a symbol


Meaning full image:If our image contain any text then we should mention the alt attribute for that image because of the above reasons.Here we can give the ALT name as alt=”fronter-Learning” Therefore we can give some meaning full details to the user

Meaning full and non textual : Incase if It is a photograph of any other informational image Then we better have to give a brief description about that image .
Here we can give the ALT name as description alt=”Containing natural Image with trees” Therefore we can give some meaning full details to the user
Also it has some condition that text should be kept to under 50 characters and should avoid specialized symbols.

No comments:

Post a Comment