Skip to content
Related Articles

Related Articles

Improve Article

HTML <dfn> Tag

  • Difficulty Level : Basic
  • Last Updated : 07 Jun, 2021

The <dfn> tag in HTML represents definition element and is used to representing a defining instance in HTML. Generally, the defining instance is the first use of a term in a document. The <dfn> tag requires a starting as well as an ending tag.
 

Syntax: 

<dfn>.....</dfn>

Below examples illustrate the <dfn> tag in HTML:

Example 1: 
 

HTML




<!DOCTYPE html>
 
<html>
 
    <body>
 
        <!--HTML dfn tag-->
         
<p><dfn>Geeksforgeeks</dfn> is a portal for geeks.</p>
 
 
    </body>
 
</html>                   

Output: 
 



Example 2: Using title attribute of the <dfn> tag. 
 

HTML




<!DOCTYPE html>
 
<html>
 
    <body>
         
         <!--HTML dfn tag with title attribute-->
          
<p><dfn title="Geeksforgeeks">GFG</dfn>
            is a portal for geeks.</p>
 
 
    </body>
 
</html>                   

Output: 
 

Example 3: Using title attribute of the <abbr> tag inside the <dfn> element. 
 

HTML




<!DOCTYPE html>
 
<html>
 
    <body>
 
         <!--HTML dfn tag with title attribute and abbr tag-->
          
<p><dfn><abbr title="Geeksforgeeks">GFG</abbr>
         </dfn> is a portal for geeks.</p>
 
 
    </body>
 
</html>                   

Output: 
 

Example 4: Using id attribute along with the <dfn> tag. 
 

HTML




<!DOCTYPE html>
 
<html>
 
    <body>
 
        <!--HTML dfn tag with id attribute-->
         
<p><dfn id="Geeksforgeeks">GFG</dfn> is a
            portal for geeks.</p>
 
         
<p>Practice questions for cracking
           technical interviews.</p>
 
         
<p>Prepare for GATE CSE – 2019</p>
 
         
<p>Visit <a href="#Geeksforgeeks">GFG</a>.</p>
 
 
    </body>
 
</html>                   

Output: 
 

Supported Browsers: 

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari

 

Attention reader! Don’t stop learning now. Get hold of all the important Comcompetitivepetitve Programming concepts with the Web Design for Beginners | HTML  course.




My Personal Notes arrow_drop_up
Recommended Articles
Page :