HTML <abbr> Tag
定义和用法
<abbr>
标签定义缩写词或首字母缩写词,例如“HTML”、“CSS”、“Mr.”、“Dr.”、“ASAP”、“ATM”。
通过对缩写进行标记,您能够为浏览器、拼写检查和搜索引擎提供有用的信息。
<abbr>
标签最初是在 HTML 4.0 中引入的,表示它所包含的文本是一个更长的单词或短语的缩写形式。
提示:当您将鼠标悬停在元素上时,使用全局 title 属性可显示对缩写词/首字母缩略词的描述。
另请参阅:
HTML DOM 参考手册:Abbreviation 对象
实例
例子 1
缩写是这样标记的:
<abbr title="World Health Organization">WHO</abbr> was established in 1948.
Example 2
<abbr> can also be used with <dfn> to define abbreviations: <p> <dfn><abbr title="Cascading Style Sheets">CSS</abbr></dfn> It is a language that describes the style of HTML documents. </p>
Global attributes
<abbr>
The tag also supports Global attributes in HTML.
Event attributes
<abbr>
The tag also supports Event attributes in HTML.
Default CSS settings
Most browsers will use the following default values to display <abbr>
Element:
abbr { display: inline; }
Browser support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |