HTML5中对title属性的定义与规定
May 17, 2016 am 09:09 AM注意,这里说的不是title标签(<title></title>),而是title属性(如 <a title=”…)
总结:
元素的title属性的值就是该元素的咨询信息,并有可能适当的以提示框的形式显示出来。
title属性是纯文本形式的。
例如:超级连接的(<a>标签)title属性可以设置成目标资源的简单描述
示例:
代码: 全选 运行
<a href="#" title="点击这里可以注册成本站会员">注册</a>
当一个元素没有设置title属性的时候,意味着该元素将受其最近一级设置有title属性的祖先元素的title属性值的影响。
当由一个元素任何祖先元素的title值都不能表达该元素的咨询信息时,你应该为它单独设置一个title值。
当一个元素没有咨询信息的时候,你可以把它设置成空字符串。
title标签可以用
(Unicode Character ‘LINE FEED (LF)’ (U+000A)的html表现形式)换行。
代码示例:
<p><a href="http://www.htmlv.cn" title="这是一个 不错的论坛">HTML5中文论坛</a></p>
以上代码当鼠标悬在连接上的时候,title的提示框将以两行的形式显示(IE7下测试通过,Firefox下测试未通过)。
对于一些特殊的元素,诸如 link, abbr, 和 input这些元素,title属性有附加的含义,超出了以上的描述。
title的属性值应该与其的内容值相符。

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

How uniapp achieves rapid conversion between mini programs and H5

Which version is more stable: win1121h2 or 22h2?

What is the role and usage of springboot admin monitoring

How to use Flask-Admin to implement the background management interface

You need the permissions provided by admin to make changes to this file. How to solve this problem?

Which is the better choice: win1123h2 or 22h2?

Solve the problem of not getting Win11 23H2 update
