Let's turn our attention to the topic of abbreviations on web pages, or rather, the clarity of these abbreviations to readers. This article discusses the abbr and acronym tags and the nuances associated with them.
Attention!!! In the HTML5 spec, the element acronym has been declared completely deprecated and is strongly recommended to be phased out. Instead, it is proposed to use the element abbr(updates as of 10.11.2011).
Dealing with terminalology
An abbreviation (Italian abbreviatura - abbreviation, from Latin abbrevio - abbreviated) is an abbreviated form of a word or group of words used instead of a whole word or phrase. For example: WWW, HTTP, URI, abbr. etc. Acronym (Greek akros - high, onyma - name) is an abbreviation formed from parts of words of the original phrase (usually initial letters), pronounced as a single word, and not letter by letter, like other types of abbreviations. For example: modem, radar, or laser.Abbreviations and acronyms should be understood by everyone and always
Quite often, we use various abbreviations, ranging from "zamkomomorde" and ending with "ASS" (this is not at all what you thought). But also, quite often, many people have no idea what these acronyms mean. Therefore, using any term that is an abbreviation or acronym, you need to give them explanations. Moreover, if you introduced the term at the beginning, having interpreted it, this does not mean that the person will not forget its meaning in 2 minutes; therefore, explanations should always be there.
HTML tags and
HTML 4 provides us with two logical formatting elements used to highlight abbreviations and acronyms - abbr and acronym, respectively. These tags have a title attribute that explains the term. Any normal browser hovering over such a term will display a tooltip specified by the title attribute.
Example: WWW Modem
WWW Modem
Billy Who Doesn't Like W3C
IE (up to version 6) does not support ABBR tag(sorry to be so straight away, without preparation :-)
In the list of elements he knows, only the ACRONYM element is listed. But I'm sure this will be fixed in the seventh version of the browser.
Of course, you can give up and use the acronym tag instead of the abbr tag, but then do not be surprised if the user's voice agent pronounces the letter abbreviation URI, not letter by letter, but in one word, and you get the name Uri from X / F "Adventures of Electronics". But you can find a workaround, for example, insert a SPAN element inside ABBR:
CSS
And it is better to automate this process by performing inserts using a script, after loading the document and only for IE. And what is very important, there will be no need to change correct the original text of the document.
Hovering a CSS marafet
Since abbr and acronym are boolean formatting elements, browsers can display them differently on the page. For example, Mozilla Firefox and Opera display these elements with black underlining as dots, Konqueror - italicizes, and IE does not visually emphasize (acronym).
Therefore, it does not hurt to set styles that would unify the display of these elements in different browsers.
For example, like this:
ABBR, ACRONYM (
border-bottom: 1px dotted # F04B2D;
cursor: help;
font-style: italic;
TEG
thermoelectric generator
tech.
Vocabulary: S. Fadeev. Dictionary of abbreviations of the modern Russian language. - S.-Pb .: Polytechnic, 1997 .-- 527 p.
TEG
triethylene glycol
TEG
thromboelastogram
honey.
Source: http://cardio-burg.ru/magazin/magazin.php?nnn=2000_2&cont=20002s8
TEG
therapeutic evacuation hospital
honey.
Vocabulary: Dictionary of abbreviations and abbreviations of the army and special services. Compiled by A. A. Shchelokov. - Moscow: OOO Publishing House AST, ZAO Publishing House Geleos, 2003. - 318 p.
Dictionary of abbreviations and acronyms... Academician. 2015.
Synonyms:See what "TEG" is in other dictionaries:
Tag- (tag, English tag "label, label, tag; tag") label as keyword, in a narrower application, an identifier, for categorizing, describing and searching for data, setting the internal structure. Application examples: Markup language element ... ... Wikipedia
tag- noun, number of synonyms: 3 descriptor (5) tag (2) label (25) ASIS synonym dictionary. V.N. Trishin ... Synonym dictionary
Tag- p. in the Syktyvdinsky district. Named after r. Tagyu, right, a tributary of the Vychegda, near which is located: Komi tag "sulfur", yu "river". Tegyu "a river near which there are sulfur outlets." In this area, natural sulfur was previously mined for economic needs ... ... Toponymic Dictionary of the Komi Republic
TEG- 3.1.45 tag: A service element that is placed at the beginning of a header and is stored with the data cannot be used as independent element... Source … Dictionary-reference book of terms of normative and technical documentation
TEG- see Thermoelectric generator ... Big Encyclopedic Polytechnic Dictionary
TEG- ... Wikipedia
TEG- thermoelectric generator ... Dictionary of abbreviations of the Russian language
protocol identifier tag- - [GOST R 54325 2011 (IEC / TS 61850 2: 2003)]] Topics relay protection EN tag protocol identifier TPID ... Technical translator's guide
I-Tag-Yugan- Characteristic Length 35 km Basin Kara Sea Watercourse Mouth 33 km on the left bank of the Mogot Leim channel Posl Location ... Wikipedia
Thermoelectric generator- (TEG) thermoelectric generator, a device for direct conversion of thermal energy into electrical energy, the principle of operation of which is based on the Seebeck effect (see. Thermoelectric phenomena). The TEG includes: thermopiles recruited from ... ... Great Soviet Encyclopedia
The HTML Abbreviation element( ) represents an abbreviation or acronym; the optional title attribute can provide an expansion or description for the abbreviation. If present, title must contain this full description and nothing else.
The source for this interactive example is stored in a GitHub repository. If you "d like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Accessibility concerns
Spelling out the acronym or abbreviation in full the first time it is used on a page is beneficial for helping people understand it, especially if the content is technical or industry jargon.
Example
JavaScript Object Notation ( Json) is a lightweight data-interchange format.
This is especially helpful for people who are unfamiliar with the terminology or concepts discussed in the content, people who are new to the language, and people with cognitive concerns.
Specifications
Specification | Status | Comment |
---|---|---|
HTML Living Standard The definition of " "in that specification. |
Living Standard | |
HTML5 The definition of " "in that specification. |
Recommendation | |
HTML 4.01 Specification The definition of " "in that specification. |
Recommendation |
Browser compatibility
The compatibility table in this page is generated from structured data. If you "d like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | Android webview | Chrome for Android | Firefox for Android | Opera for Android | Safari on iOS | Samsung Internet | |
abbr | Chrome Full support 2 | Edge Full support Yes | Firefox Full support 1 Notes Full support 1Notes Notes Before Firefox 4, this element implemented the HTMLSpanElement interface instead of the standard HTMLElement interface. | IE Full support 7 | Opera Full support Yes | Safari Full support Yes | WebView Android Full support Yes | Chrome Android Full support Yes | Firefox Android Full support 4 | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
Legend
Full support Full support See implementation notes. See implementation notes.See also
- Other elements conveying text-level semantics: element (or anchor element), with its href attribute, creates a hyperlink to web pages, files, email addresses, locations in the same page, or anything else a URL can address. ">, !} ,) indicates that its contents have strong importance, seriousness, or urgency. Browsers typically render the contents in bold type. "> , element represents side-comments and small print, like copyright and legal text, independent of its styled presentation. By default, it renders text within it one font-size small, such as from small to x-small. "> ,) is used to describe a reference to a cited creative work, and must include the title of that work. "> , element indicates that the enclosed text is a short inline quotation. Most modern browsers implement this by surrounding the text in quotation marks. ">
,) is used to indicate the term being defined within the context of a definition phrase or sentence. "> , element represents a specific period in time. ">
- The obsolete) allows authors to clearly indicate a sequence of characters that compose an acronym or abbreviation for a word. "> Element, whose responsibilities were folded into
The code element is used to indicate computer code or programming language such as PHP, JavaScript, CSS, XML, etc. For short snippets within a sentence, you can simply place an element around the code snippet like this:
onclick
directly in the HTML.
For larger code samples that span multiple lines, preformatted blocks can be used as shown in "Lecture 15", "Marking up text content in HTML".
Although there is no definite method of indicating which programming language or the code is shown in the code element, the class attribute can be used. A common practice (mentioned in the HTML 5 draft) is to use the language- prefix and then add the language name. Therefore, the example above will look like this:
It is bad form to use event handlers like onclick
directly in the HTML.
Some programming languages have names that are not easy to represent in classes, such as C # (C-sharp). The right way the record in this case will be "class =" language-c \ # "", which can create difficulties and lead to typos. I would recommend using a class with only letters and hyphens and writing it down in its entirety. Therefore, in this case, use "class =" language-csharp "" better.
Conclusion of interaction with the computer
Two elements samp and kbd can be used to input and output interactions with a computer program. For example:
One common method of determining if a computer is connected to the internet is to use the computer program ping
to see if a computer likely to be running is reachable.
kittaghy% ping -o google.com PING google.com (64.233.187.99): 56 data bytes 64 bytes from 64.233.187.99: icmp_seq = 0 ttl = 242 time = 108.995 ms --- google.com ping statistics --- 1 packets transmitted, 1 packets received, 0 % packet loss round-trip min / avg / max / stddev = 108.995 / 108.995 / 108.995 / 0.000 ms
Element samp indicates a sample of the output from computer program... As shown in this example, Various types output can be specified using the class attribute. However, there is no widely accepted agreement on what kinds of classes to use.
The kbd element specifies the input for user-computer interaction. While this is traditionally keyboard input (hence the abbreviation "kbd"), it should also be used to indicate other types of input, such as voice input.
Variables
The var element is used to specify variables in text content. It can include algebraic mathematical expressions or it can be found in program code. For example:
The value of x in 3 x+ 2 = 14 is 4.
my $ welcome= "Hello world!";
Citation
The cite element is used to indicate where the adjacent content comes from - when citing a person, book, or other publication, or usually when referring people to another source, that source should be placed in the cite element. For example:
The saying Everything should be made as simple as possible, but not simpler
is often attributed to Albert einstein, but it actually a paraphrasing of a quote which is much less easy to understand.
Description
Tag indicates that the character sequence is an abbreviation. The title attribute is used to decode the abbreviation, which allows people who are not familiar with the abbreviation to understand the abbreviation. Besides, search engines index the full-text version of the abbreviation that can be used to increase the rating of the document.
Browsers do not highlight text in any way , with the exception of Opera before version 15, which adds dotted underlines to text.
Syntax
TextAttributes
Adds a tooltip to the text, in which you can explain the abbreviation.End tag
Required.
HTML5 IE Cr Op Sa Fx
CGI denotes the protocol by which any external programs interact with the web server. Using CGI on the server, you can run programs in any programming language and display the result of their action in the form of a web page.
The result of this example is shown in Fig. one.
Rice. 1. View of the tooltip when hovering over the abbreviation text
Browsers
Internet browser Explorer up to and including version 6 does not support the tag , instead it is recommended to use the tag .