Abbreviation tag in HTML

Abbreviation tag:

Abbreviation meaning in general term is short form and that is meaningful.

Abbreviation tag is represented using <abbr>.  

For example here some examples : CBI , LA , IST , etc . 

  • While using <abbr> tag we must use title attribute. 
  • Title attribute gives definition of abbreviation.
  • Without title attribute it's like a normal text.
  • <abbr> tag is a span level element

Code:

<!DOCTYPE html>
<html>
<head>
    <title>
        Abbr and acronym
    </title>
</head>
<body>
    <div><abbr title="Central Bureau of Investigation">CBI</abbr>&nbsp;- hover me [keep your mouse on CBI ].</div>
    <div><abbr title="number">No</abbr>&nbsp;- hover me [keep your mouse on No ].</div>
    <div><abbr title="State Bank of India">SBI</abbr>&nbsp;- hover me [keep your mouse on SBI ].</div>
</body>
</html>

Output:

CBI - hover me [keep your mouse on CBI ].
No - hover me [keep your mouse on No ].
SBI - hover me [keep your mouse on SBI ].

Post a Comment

Post a Comment (0)

Previous Post Next Post