Home  >  Article  >  Web Front-end  >  What is the title function of img

What is the title function of img

hzc
hzcOriginal
2020-06-24 14:52:187371browse

The title function of img is to display a floating box with the text displayed when the mouse stays on the image. The title is a global attribute that provides additional prompt information. When the mouse slides to the element, the definition is displayed. tips.

What is the title function of img

title is a global attribute that provides additional prompt information. When the mouse slides over the element, the defined prompt is displayed. The title in the Link and style elements is special and represents the name of the style sheet; alt is a local attribute and can be used in elements such as img and input to provide alternative text when the image is loading or fails to load. Note that the alt attribute can only be used when the type attribute of the input element is image.

1. The title attribute is the content displayed when the mouse is moved up. The code is as follows:

<img  src="eg_tulip.jpg"  title="上海鲜花港 - 郁金香" / alt="What is the title function of img" >

2. The running effect is as follows:

What is the title function of img

Recommended Tutorial: "HTMLTutorial"

The above is the detailed content of What is the title function of img. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn