English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The <dfn> tag in HTML is used to mark the term being defined in the document. The definition of the term must be found in the parent of the <dfn> tag. Usually, browsers will present the text found in the <dfn> tag as italic text. This tag is also commonly referred to as the <dfn> element.
Format text in the document:
!doctype html> <html> <head> <meta charset="UTF-8"> <title>HTML5 Usage of <dfn> tag (Basic Tutorial Website oldtoolbag.com)</title> </head> <body> <p><dfn>HTML</dfn> is the technology used to create web pages.</p> </body> </html>Test and see ‹/›
In this HTML5In the document example, we created the <dfn> tag to identify the term 'HTML' defined in the current paragraph tag.
IEFirefoxOperaChromeSafari
All mainstream browsers support the <dfn> tag.
The <dfn> tag is a phrase tag used to define a definition item.
Tip: We are not against using this label, but if you are just using this label to achieve a certain visual effect, we suggest using CSS, which may achieve richer effects.
All phrase labels:
Label | Description |
---|---|
<em> | Presented as emphasized text. |
<strong> | Define important text. |
<dfn> | Define a definition item. |
<code> | Define computer code text. |
<samp> | Define sample text. |
<kbd> | Define keyboard text. It indicates that the text is typed from the keyboard. It is often used in documents or manuals related to computers. |
<var> | Define variables. You can use this tag in conjunction with <pre> and <code> tags. |
The <dfn> element marks the defined term; the term definition should be given in <p>, <section>, or a definition list (usually a pair of <dt>, <dd>).
The value of the defined term is determined by the following rules:
If the <dfn> element has a title attribute, then the value of the term is the value of that attribute.
Otherwise, if it contains only one <abbr> element with a title attribute, then the value of the term is the value of that attribute.
Otherwise, the text content of the <dfn> element is the value of the term.
<dfn> tag supports HTML Global Attributes.
<dfn> tag supports HTML Event Attributes.
HTML Tutorial:HTML Text Formatting