Struct dioxus_html::h1

source ·
pub struct h1;
Expand description

Build a <h1> element.

About

  • The HTML <h1> element is found within the <body> tag.
  • Headings can range from <h1> to <h6>.
  • The most important heading is <h1> and the least important heading is <h6>.
  • The <h1> heading is the first heading in the document.
  • The <h1> heading is usually a large bolded font.

Usage

html!(<h1> A header element </h1>)
rsx!(h1 { "A header element" })
LazyNodes::new(|f| f.el(h1).children([f.text("A header element")]).finish())

Implementations§

Trait Implementations§

Prevent the default action for this element. Read more
The HTML class attribute is used to specify a class for an HTML element. Read more
dangerous_inner_html is Dioxus’s replacement for using innerHTML in the browser DOM. In general, setting HTML from code is risky because it’s easy to inadvertently expose your users to a cross-site scripting (XSS) attack. So, you can set HTML directly from Dioxus, but you have to type out dangerous_inner_html to remind yourself that it’s dangerous

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.