pub struct H1;Expand description
The <h1> element - level 1 heading.
§Purpose
The <h1> element represents the highest level (most important) heading in a document.
It typically represents the main title or subject of the page or section. There should
generally be only one <h1> per page for SEO and accessibility best practices.
§Content Categories
- Flow Content
- Heading Content
- Palpable Content
§Permitted Content Model
- Phrasing content
§Common Use Cases
- Main page title
- Primary heading for the document
- Top-level section heading
§Key Attributes
- Global attributes only
§Example
<article>
<h1>Introduction to Web Accessibility</h1>
<p>Web accessibility ensures that websites...</p>
</article>§Accessibility
- Screen readers use headings for navigation
- Should have only one
<h1>per page - Creates the document outline structure
§WHATWG Specification
Trait Implementations§
Source§impl HtmlElement for H1
impl HtmlElement for H1
impl CanContain<H1> for Hgroup
impl<T: PhrasingContent> CanContain<T> for H1
impl CanContain<Text> for H1
impl FlowContent for H1
impl HeadingContent for H1
impl PalpableContent for H1
Auto Trait Implementations§
impl Freeze for H1
impl RefUnwindSafe for H1
impl Send for H1
impl Sync for H1
impl Unpin for H1
impl UnwindSafe for H1
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more