Contents
HTML dfn Tag: Main Tips
- The
dfntag is used to indicate a defined term. dfnstands for definition.- This tag supports global attributes.
Usage of HTML Definition Tag
The HTML dfn tag represents a term that needs and has an explanation. It is usually used when a specific term first occurs in a page.
The term definition can be provided by a <p> element, a pair of <dt> and <dd> elements, or a <section> which the <dfn> element is a child of.
- Easy to use with a learn-by-doing approach
- Offers quality content
- Gamified in-browser coding experience
- The price matches the quality
- Suitable for learners ranging from beginner to advanced
- Free certificates of completion
- Focused on data science skills
- Flexible learning timetable
- Simplistic design (no unnecessary information)
- High-quality courses (even the free ones)
- Variety of features
- Nanodegree programs
- Suitable for enterprises
- Paid Certificates of completion
- A wide range of learning programs
- University-level courses
- Easy to navigate
- Verified certificates
- Free learning track available
- University-level courses
- Suitable for enterprises
- Verified certificates of completion
Most Common Attributes
When using the HTML definition tag, you can also include a title attribute. Its value will then be considered to be the defined term, and shown when you hover your mouse over the <dfn> element:
<p>
<dfn title="Cascading Style Sheet">CSS</dfn> is the styling language for HTML.
</p>
Note: if your dfn HTML tag has no title attribute, all it will do is specify where the defined term is in the definition.
You can also add an id attribute to the <dfn> element. Then, whenever a term is used, you can refer back to the definition using the <a> tag. This is handy when you use the same term, and want to remind the reader what it means:
<p><dfn id="css-def">CSS</dfn> is the styling language for HTML.</p>
<p>This is a paragraph</p>
<p>This is a paragraph</p>
<p>Learn <a href="#css-def">CSS</a> now.</p>
Browser support
Chrome
Edge
Firefox
IE
Opera
Safari
Mobile browser support
Chrome
Firefox
Opera