Spread the love

HTML <dfn> Tags are also called definition tags. It is used to represent a defined word in the context of a definition sentence or sentence in an HTML document. The defined example word is usually the first word in the document.

If a word is contained in the <dfn> element, the browser understands that the nearest text is the definition of the word.

Using the title attribute in the <dfn> Tag, hover over the word written inside <tag>……</tag> will show the title given below. An example is also given below.

HTML <dfn> Tag Example

Example1:-

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>HTML Dfn Tag</title>
</head> 
<body>  
<h1>Example of HTML Dfn Tag</h1>  
<p><dfn>HTML</dfn> A markup language for Web designing</p>   
</body>  
</html>  

Output:-

HTML <dfn> Tag Example with title Attribute

Example2:-

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>HTML Dfn Tag</title>
</head> 
<body>  
<h1>Example of HTML Dfn Tag with title attribute</h1>  
<p><dfn title="Hypertext Markup Language">HTML</dfn> A markup language for Web designing</p>   
</body>  
</html>  

Output:-


Spread the love

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *