The difference between HTML img title and img alt
The difference between HTML img title and img alt lies in the two aspects of "purpose of use and rendering effect". Simply put, img title and img alt are two different things. img title is a picture title, which is similar to a web page title. The caption text of the marked picture will be automatically displayed when the mouse is placed on the picture, but img alt is completely different! Img alt is the alternative text of the picture. The so-called alternative text means the text to be presented when the picture fails. If the picture can be displayed normally, img alt will not have any function.
Syntax of HTML img title and img alt
- HTML img alt Picture alternative text
- HTML img title Mouse over to display text mark
<img src="Image URL" title="Move up to see the text" style ="border:1px black solid;">

In order to make the image of the sample display a little clearer, we use CSS style to add a black outer border to the image. The syntax is "style="border:1px black solid;"". If you are interested in design, you can refer to the contents of " img border picture frame " and " CSS border frame ".
Post a Comment
0 Comments