HTML | <dfn> Тег
Опубликовано: 1 Марта, 2022
Тег <dfn> в HTML представляет элемент определения и используется для представления определяющего экземпляра в HTML. Как правило, определяющий экземпляр - это первое использование термина в документе. Для тега <dfn> требуется как начальный, так и конечный тег.
Синтаксис:
<dfn> ..... </dfn>
Примеры ниже иллюстрируют тег <dfn> в HTML:
Example 1:
<!DOCTYPE html> < html > < head > < title >HTML dfn tag</ title > </ head > < body > < p >< dfn >Geeksforgeeks</ dfn > is a portal for geeks.</ p > </ body > </ html > |
Выход:
Example 2: Using title attribute of the <dfn> tag.
<!DOCTYPE html> < html > < head > < title >HTML dfn tag with title attribute</ title > </ head > < body > < p >< dfn title = "Geeksforgeeks" >GFG</ dfn > is a portal for geeks.</ p > </ body > </ html > |
Выход:
Example 3: Using title attribute of the <abbr> tag inside the <dfn> element.
<!DOCTYPE html> < html > < head > < title >HTML dfn tag with title attribute and abbr tag</ title > </ head > < body > < p >< dfn >< abbr title = "Geeksforgeeks" >GFG</ abbr > </ dfn > is a portal for geeks.</ p > </ body > </ html > |
Выход:
Example 4: Using id attribute along with the <dfn> tag.
<!DOCTYPE html> < html > < head > < title >HTML dfn tag with id attribute </ title > </ head > < body > < p >< dfn id = "Geeksforgeeks" >GFG</ dfn > is a portal for geeks.</ p > < p >Practice questions for cracking technical interviews.</ p > < p >Prepare for GATE CSE – 2019</ p > < p >Visit < a href = "#Geeksforgeeks" >GFG</ a >.</ p > </ body > </ html > |
Выход:
Поддерживаемые браузеры: браузеры, поддерживаемые тегом <dfn>, перечислены ниже:
- Гугл Хром
- Internet Explorer
- Fire Fox
- Опера
- Сафари