HTML <dfn> element, also known as the HTML definition tag, serves the purpose of denoting a term defined within the context of a definition phrase or sentence within an HTML document. Typically, this defined term is the initial term in a document.
If a term is enclosed in the <dfn> tag, the browser interprets the adjacent text as the definition of the term.
Syntax
Example
<dfn>Content......... </dfn>
Following are some details regarding the HTML <dfn> element:
| Display | Inline |
|---|---|
| Start tag/End tag | Both Start and End tag |
| Usage | Textual |
Example
Example
<!DOCTYPE html>
<html>
<head>
<title>Dfn tag</title>
</head>
<body>
<h2>Example of dfn Tag</h2>
<p><dfn>HTML</dfn> A markup language for Web designing</p>
</body>
</html>
Output:
Using title attribute:
Example
<!DOCTYPE html>
<html>
<head>
<title> Dfn tag</title>
</head>
<body>
<h2>Example of dfn Tag</h2>
<p> <dfn title="Transmission control protocol">TCP</dfn> is one of the main protocol of Internet protocols, used to interconnect network devices over the Internet</p>
</body>
</html>
Output:
Attribute
Tag-specific attribute
| Attribute | Value | Description |
|---|---|---|
| title | It specifies the definition of the term, and it shows when mouse hover on it. |
Global attribute
HTML <dfn> tag enables the utilization of global attributes within HTML.
Event attribute
HTML <dfn> tag enables the utilization of event attributes within HTML.
Supporting Browsers
| Element | Chrome | IE | Firefox | Opera | Safari |
|---|---|---|---|---|---|
<dfn> |
Yes | Yes | Yes | Yes | Yes |