Home  >  Article  >  Web Front-end  >  The difference between and tags in html

The difference between and tags in html

黄舟
黄舟Original
2017-06-19 14:21:392959browse

abbr and acronym are two tags that are easily overlooked. They may seem meaningless, but they play an important role in the accessibility of the website. These two tags already exist in HTML 4, but so far IE has not been able to recognize abbr. The good news is that IE7 will support abbr. and are similar. Both "indicate that the text it contains is a shortened form of a longer word or phrase". By tagging only acronyms, you can provide useful information to browsers, spell checkers, translation systems, and search engine indexers. The tag was originally introduced in HTML 4.0. All major acronym browsers support the tag. Of course, IE 5.5 or earlier versions of IE browsers do not support the tag

As for when to use abbr and when to use acronym, this problem is a headache. Let me talk about my personal opinion first. IE currently supports acronym. If you are not a fundamentalist, you can ignore abbr. acronym, just use acronym.

comes from the English acronym, which means an acronym.

Derived from the English abbreviation, which means abbreviation, simplification, and abbreviation. It is a collective name for the abbreviation of a word or phrase.

Let me give you an example and everyone will know. People's Republic of China means the People's Republic of China, and its abbreviation is PRC (that is, it is an abbreviation and acronym), which is recognized by the world; Another example is the month we often see: August, its abbreviation is Aug, that is, the abbreviation is Aug.

Then let’s look at it from the other side: It’s not easy for programmers to find GF (girlfriend girl friend, I forgot whether to write it continuously or separately, let’s write it separately for now AQA), this is An acronym commonly used when chatting and joking among friends.

PRC, Aug application tag, GF application .

男程序员找BF很难。

PRC 是中华人名共和国。

Rendering:

The difference between <abbr> and <acronym> tags in html

All acronyms can be said to be abbreviations, but not all abbreviations are acronyms . That is to say, acronyms are a subset of abbreviations.

So, under what circumstances should we use , and under what circumstances should we use ? I summarized it a little: words that can be replaced by abbreviations in formal occasions or formal written documents, socially recognized and highly popular words should be used, Other cases, most use .

The previously mentioned acronyms are a subset of abbreviations, so in any case you can use instead of . And in HTML5, the tag has been replaced by , and the tag will be abandoned in HTML5 and later versions.

These two tags are rarely used in our daily work, and they are rarely seen on some websites, and are almost forgotten by us.
IE6 does not support the abbr tag, IE7 and FF support it, and other browsers have not been tested.

The above is the detailed content of The difference between and tags in html. 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