pub struct Title;Expand description
The <title> element - document title.
§Purpose
The <title> element defines the title of the document, shown in the browser’s
title bar or tab. It is also used by search engines as the page title in search
results and is important for SEO and accessibility.
§Content Categories
- Metadata Content
§Permitted Content Model
- Text content only (no child elements)
§Common Use Cases
- Setting the browser tab/window title
- Providing the page title for search engine results
- Defining the default bookmark name
- Displaying the page title when sharing on social media
§Key Attributes
- Global attributes only (rarely used)
§Example
<head>
<title>Introduction to HTML - Web Development Tutorial</title>
</head>§Accessibility
- The title is announced by screen readers when navigating to a page
- Should be descriptive and unique for each page
- Typically 50-60 characters for optimal display in search results
§WHATWG Specification
Trait Implementations§
Source§impl HtmlElement for Title
impl HtmlElement for Title
impl CanContain<Text> for Title
impl CanContain<Title> for Head
impl MetadataContent for Title
Auto Trait Implementations§
impl Freeze for Title
impl RefUnwindSafe for Title
impl Send for Title
impl Sync for Title
impl Unpin for Title
impl UnwindSafe for Title
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