DFN HTML

HTML <dfn> Tag

The HTML <dfn> tag represents the HTML definition tag. The content of the HTML <dfn> tag is a term whose definition is understood to be the nearby text by the browser.

Syntax:

<dfn>Content</dfn>

Example:

<!DOCTYPE html>
<html>
<body>
<p><dfn>Apple</dfn> is a fruit.</p>
</body>
</html>

Explanation:

In the above example, we are using the HTML <dfn> tag to specify that the nearby text is the definition of the term defined within the <dfn> tag.

Example: Using the title attribute.

<!DOCTYPE html>
<html>
<body>
<p><dfn title="Fruits">Apple</dfn> is a fruit.</p>
</body>
</html>

Explanation:

In the above example, we are using the title attribute of the HTML <dfn> tag to specify the definition of the term defined within the <dfn> tag when mouse hovers over it.

Tag specific Attribute:

Attribute Uses
title Used to specify the definition of the term defined within the <dfn> tag when the mouse hovers over it.

Global Attributes:

The HTML Global attributes are supported by the HTML <dfn> tag.

Event Attributes:

The HTML Event attributes are supported by the HTML <dfn> tag.

Supporting Browsers:

Chrome, IE, Firefox, Opera, and Safari.

Please follow and like us:
Content Protection by DMCA.com