HTML | <dfn> Tag

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:

filter_none

edit
close

play_arrow

link
brightness_4
code

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

chevron_right


Output:



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

filter_none

edit
close

play_arrow

link
brightness_4
code

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

chevron_right


Output:

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

filter_none

edit
close

play_arrow

link
brightness_4
code

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

chevron_right


Output:

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

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
    <head>
        <title>HTML dfn tag with id attribute </title>
    </head>
    <body>
        <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>

chevron_right


Output:

Supported Browsers: The browser supported by <dfn> tag are listed below:

  • Apple Safari 1+
  • Google Chrome 1+
  • Firefox 1+
  • Opera 4+
  • Internet Explorer 2+


My Personal Notes arrow_drop_up

I am a technology enthusiast who has a keen interest in programming I am pursuing Engineering in Computer Science from GEU, Dehradun I like to unwind by watching movies and English sitcomsI have a keen interest in music

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.