The difference between the alt attribute and the title attribute of img, And the alttitle attribute of img
When we add attributes to images, we may confuse the differences between alt and title at the beginning. The differences between the two are as follows --
The original alt word is "Alternate", which means switching and replacement. You can use the alt key to switch between Chinese and English. According to youdao standard, the meaning is as follows:
Title, that is, the title and topic of an object. If an article has a title, the title is used to provide a summative description of the article.
Therefore, the distinction is easy to differentiate. In the HTML document editing img tag, alt serves to replace the description when img cannot be displayed and tell people what it is; title is the topic used to describe the image. no matter whether the image is displayed or not, as long as the img Tag exists, the title content will pop up when the mouse points to the position of the img.
Let's look at the instance:
Instance 1: images can be displayed,
Instance 2: The image is not displayed,
In short;
Alt is used to describe the objects that cannot be displayed when the image cannot be displayed;
Title is the title Topic of an image. As long as the img Tag exists, no matter whether the image is displayed or not, the mouse will appear when it is stuck here;