HTML <dfn> tag

The <dfn> tag is used to identify the defining instance of a term in an HTML document. It is defined mainly at the beginning of a sentence.

Type: Inline Element

Syntax of <dfn> tag

<dfn> Term </dfn>
Whenever a term is defined within the <dfn> element, the web browser will realize that a definition or explaination is about to be declared.

Supported Browsers

Tag Chrome Internet Explorer Firefox Safari Opera Mini
<dfn> Yes Yes Yes Yes Yes

Full code example

<!DOCTYPE html>
<html>
<head>
</head>
<body>
 <p>
  <dfn>HTML</dfn> is a markup language used to create the structure of web pages.
 </p>
 <p>
  <dfn>CSS</dfn> is a style sheet language used to design and style HTML documents.
 </p>
</body>
</html>
Run The code »

Output on the browser

HTML is a markup language used to create the structure of web pages.

CSS is a style sheet language used to design and style HTML documents.

Supported Browsers

Tag Chrome Internet Explorer Firefox Safari Opera Mini
<dfn> Yes Yes Yes Yes Yes

Within the dfn element, you can add either attribute and particular HTML elements or both.

  1. Attribute

    class attribute

    <dfn class="dfn-class"> HTML </dfn> is a markup language used to create the structure of web pages.
    
    The class attribute is used for CSS styling. It also works for multiple HTML elements.

    id attribute

    <dfn id="dfn-id"> HTML </dfn> is a markup language used to create the structure of web pages.
    
    The id attribute is used to uniquely identify an element from the rest.

    title attribute

    <dfn title="Cascading Style Sheet"> CSS </dfn> is a style sheet language used to design and style HTML documents.
    
    The title attribute is used to provide additional information (or full form) about the term. The value of the title attribute will appear when users hover over the term.
  2. HTML elements

    <abbr> element

    <dfn>
      <abbr title="Hypertext Markup Language">
      HTML
      </abbr>
    </dfn>
    is the most common language for making web pages.
    
    

Usage of <dfn> tag

The <dfn> tag is used to define terms to be explained. Using the <dfn> tag improves semantic meaning, and helps screen readers, search engines.

Default CSS properties of <dfn> tag
dfn {
  font-style:italic;
}