abbr tag in html




  1. The <abbr> tag is used for indicating an abbreviation. 
  2. The title attribute is generally used to specify the whole word or phrase that the abbreviation is referring  to when you mouse over it. 
  3. An acronym is also an abbreviation, but an abbreviation is not necessarily an acronym. 
  4. By marking up abbreviations you can give useful information to browsers, spell checkers, translation systems and search-engine indexers. The <abbr> is supported in all major browsers, except IE6 or earlier versions.



Example 1 :



     <html>
     <head>
     <title>Abbr</title>
     </head>
     <body>
     <p>The <abbr title="Hyper Text Markup Language">HTML</abbr> is a markup language.</p>
     </body>
     </html>
     

Demo :





Example 2 : Abbr and Style



<html>
<head>
<title>AbbrStyle</title>
<style type="text/css">
#kk
{
color:green;
font-family:comic sans ms;
font-size:30px;
}
</style>
</head>
<body>
<p>The <abbr id="kk" title="Hyper Text Markup Language">HTML</abbr> is a markup language.</p>
</body>
</html>


Demo :




Style tag is used between head section. Above example shows how you can change <abbr> text color, font, and other font attributes.



0 comments:

Post a Comment