• Skip to main content
  • Skip to search
  • Skip to select language
MDN Web Docs
  • References
    • Overview / Web Technology

      Web technology reference for developers

    • HTML

      Structure of content on the web

    • CSS

      Code used to describe document style

    • JavaScript

      General-purpose scripting language

    • HTTP

      Protocol for transmitting web resources

    • Web APIs

      Interfaces for building web applications

    • Web Extensions

      Developing extensions for web browsers

    • Accessibility

      Build web projects usable for all

    • Web Technology

      Web technology reference for developers

  • Learn
    • Overview / MDN Learning Area

      Learn web development

    • MDN Learning Area

      Learn web development

    • HTML

      Learn to structure web content with HTML

    • CSS

      Learn to style content using CSS

    • JavaScript

      Learn to run scripts in the browser

    • Accessibility

      Learn to make the web accessible to all

  • Plus
    • Overview

      A customized MDN experience

    • AI Help

      Get real-time assistance and support

    • Updates

      All browser compatibility updates at a glance

    • Documentation

      Learn how to use MDN Plus

    • FAQ

      Frequently asked questions about MDN Plus

  • Curriculum New
  • Blog
    • Playground

      Write, test and share your code

    • HTTP Observatory

      Scan a website for free

    • AI Help

      Get real-time assistance and support

  • Log in
  • Sign up for free
  1. 給開發者的 Web 技術文件
  2. HTML:超文本標記語言
  3. HTML 參考
  4. Elements
    • English (US)
    • Deutsch
    • Español
    • Français
    • 日本語
    • 한국어
    • Português (do Brasil)
    • Русский
    • 中文 (简体)

此頁面由社群從英文翻譯而來。了解更多並加入 MDN Web Docs 社群。

在本文中

  • 嘗試一下
  • 屬性
  • 使用注意事項
  • 範例
  • 技術摘要
  • 規範
  • 瀏覽器相容性
  • 參見
  1. HTML:超文本標記語言
  2. Guides
  3. 內容類型
  4. Comments
  5. Date and time formats
  6. Constraint validation
  7. Viewport meta element
  8. Responsive images
  9. Microdata
  10. Microformats
  11. 怪異模式與標準模式
  12. HTML cheatsheet
  13. How to
  14. Define terms with HTML
  15. Use data attributes
  16. Use cross-origin images
  17. Add a hitmap on top of an image
  18. Author fast-loading HTML pages
  19. Add JavaScript
  20. Reference
  21. Elements
    1. 已棄用
    2. 已棄用

    3. 已棄用
    4. 已棄用
    5. 實驗性質
    6. 已棄用
    7. 已棄用
    8. 已棄用

連結到定義

要添加到定義的連結,你可以像通常一樣使用 元素創建連結。

HTML

html

The HTML Definition element (<dfn>) is used to indicate the term being defined within the context of a definition phrase or sentence.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Graece donan, Latine voluptatem vocant. Confecta res esset. Duo Reges: constructio interrete. Scrupulum, inquam, abeunti;

Because of all of that, we decided to use the <dfn> element for this project.

這裡我們看到了定義,現在具有一個 id 屬性,"definition-dfn",可以用作連結的目標。稍後,使用 元素創建了一個連結,將 href 屬性設置為 "#definition-dfn" 以設置回到定義的連結。

結果

同時使用縮寫和定義

在某些情況下,你可能希望在定義術語時使用縮寫。這可以通過將 和 元素配對使用來完成,如下所示:

HTML

html

The HST is among the most productive scientific instruments ever constructed. It has been in orbit for over 20 years, scanning the sky and returning data and photographs of unprecedented quality and detail.

Indeed, the HST has arguably done more to advance science than any device ever built.

請注意 元素嵌套在 元素內。前者確定該術語是一個縮寫(「HST」),並在其 title 屬性中指定完整術語(「哈勃太空望遠鏡」)。 後者表示縮寫術語代表一個被定義的術語。

結果

技術摘要

內容類型 流內容、段落型內容、捫及內容。
允許的內容 段落型內容,但不能有任何 元素作為後代。
標籤省略 不允許,開始和結束標籤都是必須的。
允許的父元素 任何接受段落型內容的元素。
隱含的 ARIA 角色 term
允許的 ARIA 角色 任何
DOM 介面 HTMLElement

規範

Specification
HTML
# the-dfn-element

瀏覽器相容性

參見

  • 與定義列表相關的元素:
    、
    、

Help improve MDN

Learn how to contribute.

This page was last modified on 2025年4月13日 by MDN contributors.

View this page on GitHub • Report a problem with this content
MDN logo

Your blueprint for a better internet.

  • MDN on Bluesky
  • MDN on Mastodon
  • MDN on X (formerly Twitter)
  • MDN on GitHub
  • MDN Blog RSS Feed

MDN

  • About
  • Blog
  • Careers
  • Advertise with us

Support

  • Product help
  • Report an issue

Our communities

  • MDN Community
  • MDN Forum
  • MDN Chat

Developers

  • Web Technologies
  • Learn Web Development
  • MDN Plus
  • Hacks Blog
  • Website Privacy Notice
  • Cookies
  • Legal
  • Community Participation Guidelines

Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2025 by individual mozilla.org contributors. Content available under a Creative Commons license.