如何在 HTML 中标记首字母缩略词或缩写词?
我们使用缩略版本来表示一系列字母。
HTML <abbr> 标签用于定义缩略词或缩写词,比如“HTML”、“CSS”、“先生”等。
语法
以下是 <abbr> 标签的语法。
<abbr title="Delhi Land and Finance">DLF</abbr>
示例
以下是 <abbr> 标签的示例程序。
<!DOCTYPE html> <html> <head> <title>HTML abbr tag</title> </head> <body> <h1>Timings</h1> <p> We follow <abbr title="Artificial intelligence">AI</abbr> for our webinars. </p> </body> </html>
示例
以下是为 <abbr> 标签编写的另一个示例程序。
<!DOCTYPE html> <html> <head> </head> <body> <p>DLF stands for <abbr title="Delhi Land and Finance">DLF</abbr></p> <p>Delhi Land and Finance is one of the largest commercial real estate developer in India.</p> </body> </html>
示例
以下是为 <abbr> 标签编写的另一个示例程序。
<!DOCTYPE html> <html> <head> <title>HTML abbr tag</title> </head> <body> <abbr title = "Ante Meridiem">AM</abbr> <br> <abbr title = "Post Meridiem">PM</abbr> <br> <abbr title = "Indian Standarad Time">IST</abbr> </body> </html>
当我们把鼠标悬停在指定文本上时,它将显示文本的缩写。
广告
数据结构
网络
关系型数据库管理系统
操作系统
Java
iOS
HTML
CSS
Android
Python
C 编程
C++
C#
MongoDB
MySQL
Javascript
PHP