H3

Struct H3 

Source
pub struct H3;
Expand description

The <h3> element - level 3 heading.

§Purpose

The <h3> element represents a third-level heading, used for subsections within <h2> sections. Part of the hierarchical heading structure.

§Content Categories

  • Flow Content
  • Heading Content
  • Palpable Content

§Permitted Content Model

  • Phrasing content

§Common Use Cases

  • Subsection headings within <h2> sections
  • Detailed topic divisions
  • Third-level document structure

§Key Attributes

  • Global attributes only

§Example

<h2>Frontend Development</h2>
<h3>HTML</h3>
<p>HTML provides structure...</p>
<h3>CSS</h3>
<p>CSS handles styling...</p>
<h3>JavaScript</h3>
<p>JavaScript adds interactivity...</p>

§Accessibility

  • Maintains document outline hierarchy
  • Should not skip heading levels
  • Helps screen reader users navigate

§WHATWG Specification

Trait Implementations§

Source§

impl HtmlElement for H3

Source§

const TAG: &'static str = "h3"

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 CanContain<H3> for Hgroup

Source§

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

Source§

impl CanContain<Text> for H3

Source§

impl FlowContent for H3

Source§

impl HeadingContent for H3

Source§

impl PalpableContent for H3

Auto Trait Implementations§

§

impl Freeze for H3

§

impl RefUnwindSafe for H3

§

impl Send for H3

§

impl Sync for H3

§

impl Unpin for H3

§

impl UnwindSafe for H3

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.