dfn element
If you don't know what an element is or how you must use it, I recommend you read the "HTML tags and attributes" tutorial that you can find in the HTML tutorials section.
Table of contents
Description
The dfn
element represents a term that's supposed to be defined or described in the paragraph (p
), section (section
) or description list group (dl
) where it's contained. Besides, references to a term inside dfn
can be established with the a
element.
Examples
In the following example we'll create a couple of paragraphs. In the first one, we'll define the term "Berlin wall" and we'll set the id
attribute for the dfn
element containing it. We'll do this to be able to establish a link to this term from other part of the document.
In the second paragraph, we'll be using the term again without defining it. Nevertheless, we'll make clear that this is the same term that's been defined previously, setting up a link to the id
declared in the dfn
element, thus linking both terms. For more information on how to set up this type of links, see the reference for the a
element.
<p>The <dfn id="berlin-wall">Berlin wall</dfn> was a barrier constructed by the German Democratic Republic (GDR, East Germany) starting on 13 August 1961, that completely cut off (by land) West Berlin from surrounding East Germany and from East Berlin.</p>
<p>The Eastern Bloc claimed that the wall was erected to protect its population from fascist elements conspiring to prevent the "will of the people" in building a socialist state in East Germany. In practice, the <a href="#berlin-wall">Berlin wall</a> served to prevent the massive emigration and defection that marked East Germany and the communist Eastern Bloc during the post-World War II period.</p>
The Berlin wall was a barrier constructed by the German Democratic Republic (GDR, East Germany) starting on 13 August 1961, that completely cut off (by land) West Berlin from surrounding East Germany and from East Berlin.
The Eastern Bloc claimed that the wall was erected to protect its population from fascist elements conspiring to prevent the "will of the people" in building a socialist state in East Germany. In practice, the Berlin wall served to prevent the massive emigration and defection that marked East Germany and the communist Eastern Bloc during the post-World War II period.
In the next example, the content of the dfn
element is an abbreviation (abbr
). Therefore, and as seen in the description, the content of the title
attribute ("Cascading Style Sheets") of the abbr
element will be the term defined in the containing paragraph.
<p><dfn><abbr title="Cascading Style Sheets">CSS</abbr></dfn> is a style sheet language used for describing the look of a document written in a markup language.</p>
CSS is a style sheet language used for describing the look of a document written in a markup language.
Attributes
Global attributes
For information about global attributes refer to this list of global attributes in HTML5.
Events
Global events
For information about global events refer to this list of global events in HTML5.