View this post on Medium.com

Create Inline Definitions With The <dfn> Element

Semantic HTML Foundations

The HTML <dfn> element is a text element that’s used to indicate a definition (a word and then its meaning) in your text content.

<p>A <dfn>shoe</dfn> is an article of clothing that's worn on the feet 
and makes walking more comfortable.</p>

Generally speaking, the text in the <dfn> tag is the text that’s being defined. However, if you want to use a modified version of the defined text instead of the definition itself, the <abbr> element’s title attribute can be substituted as the text to be defined.

For example:

<p>The <dfn><abbr title="Hypertext Markup Language">HTML</abbr></dfn> Specification
allows web developers to semantically define the content of their websites. </p>

As with all of the text semantics elements, the dfn element is rendered inline and expect only text (or an abbr element) as a child.


Thanks for reading. If you like my stories and want to support me, please consider subscribing to recieve email notifications for my stories.