Dfn

Struct Dfn 

Source
pub struct Dfn;
Expand description

The <dfn> element - defining instance of a term.

§Purpose

The <dfn> element represents the defining instance of a term. The paragraph, description list group, or section that contains the <dfn> element should also contain the definition of the term.

§Content Categories

  • Flow Content
  • Phrasing Content
  • Palpable Content

§Permitted Content Model

  • Phrasing content (but must not contain another <dfn> element)

§Common Use Cases

  • Defining technical terms in glossaries
  • First occurrence of a term being defined
  • Introducing new terminology
  • Academic or technical documentation

§Key Attributes

  • title: Full term being defined (if abbreviation is in content)
  • Global attributes

§Example

<p><dfn>HTML</dfn> (HyperText Markup Language) is the standard
markup language for web pages.</p>

<p>A <dfn id="def-widget">widget</dfn> is a small application
that provides specific functionality.</p>

<p><dfn><abbr title="Cascading Style Sheets">CSS</abbr></dfn>
is used for styling web pages.</p>

§WHATWG Specification

Trait Implementations§

Source§

impl HtmlElement for Dfn

Source§

const TAG: &'static str = "dfn"

The HTML tag name (e.g., “div”, “span”, “img”).
Source§

const VOID: bool = false

Whether this is a void element (self-closing, no children allowed).
Source§

impl<T: PhrasingContent> CanContain<T> for Dfn

Source§

impl CanContain<Text> for Dfn

Source§

impl FlowContent for Dfn

Source§

impl PalpableContent for Dfn

Source§

impl PhrasingContent for Dfn

Auto Trait Implementations§

§

impl Freeze for Dfn

§

impl RefUnwindSafe for Dfn

§

impl Send for Dfn

§

impl Sync for Dfn

§

impl Unpin for Dfn

§

impl UnwindSafe for Dfn

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.