قالب:Dfn

من ويكيبيديا، الموسوعة الحرة
اذهب إلى التنقل اذهب إلى البحث

{{{1}}}

توثيق القالب[عرض] [عدل] [تاريخ] [مسح الكاش] [استخدامات]

استعمال[عدل]

This template applies the HTML phrase element <dfn> around the text given as the first parameter, the term, and, if the optional second definition parameter is present, applies a dotted underline (a common style throughout the Web for indicating a term with a definition feature) and a definition pop-up "تلميح (حاسوب)" when cursor focus is on the term.

Without the second parameter, it does not do anything user-facing, and is just a form of meta-data that can be detected and acted upon by internal and external software (statistics-gathering bots, rich Web 2.0 applications, etc.), and can provide valuable contextual information to editors.

مثال[عدل]


Parameters[عدل]

Linked version:

[[Mass–energy equivalence|{{dfn|1=E=MC2|2=Mass–energy equivalence; E is energy, m is mass, and c is the speed of light in a vacuum|title=E=MC&sup2;}}]]

gives:

E=MC2

It still has a dotted underline indicating a tooltip, but is also a bluelink. Mouse hovering shows both the tooltip and, in the status bar, the target URL, in browsers that support these features.

Link inside the {{dfn}}:

{{dfn|1=[[Mass–energy equivalence|E=MC2]]|2=Mass–energy equivalence; E is energy, m is mass, and c is the speed of light in a vacuum|title=E=MC&sup2;}}

results in:

E=MC2

This doesn't mess up the page, but the definition fails and there's no tooltip cursor, meanwhile the markup is hard for other editors to understand anyway so it is .

Links, HTML, wikimarkup, and other markup cannot be applied to content in the |2= (definition) parameter, nor in a |title= parameter, only plain text and character entity references ("&-codes", like &quot;).