pub struct Address;Expand description
The <address> element - contact information.
§Purpose
The <address> element represents contact information for its nearest <article> or
<body> ancestor. This could be physical address, email, phone, social media, or any
contact method. It should not be used for arbitrary addresses.
§Content Categories
- Flow Content
- Palpable Content
§Permitted Content Model
- Flow content (but no heading content, sectioning content,
<header>,<footer>, or<address>descendants)
§Common Use Cases
- Author contact information
- Business contact details
- Article author information
- Organization contact info in page footer
§Key Attributes
- Global attributes only
§Example
<footer>
<address>
<p>Contact us:</p>
<p>Email: <a href="mailto:info@example.com">info@example.com</a></p>
<p>Phone: <a href="tel:+15551234567">+1 (555) 123-4567</a></p>
<p>123 Main St, City, State 12345</p>
</address>
</footer>
<article>
<h1>Article Title</h1>
<p>Content...</p>
<footer>
<address>
Written by <a href="mailto:author@example.com">Jane Doe</a>
</address>
</footer>
</article>§Accessibility
- Screen readers may announce address regions
- Makes contact information easily discoverable
§WHATWG Specification
Trait Implementations§
Source§impl HtmlElement for Address
impl HtmlElement for Address
impl<T: FlowContent> CanContain<T> for Address
impl FlowContent for Address
impl PalpableContent for Address
Auto Trait Implementations§
impl Freeze for Address
impl RefUnwindSafe for Address
impl Send for Address
impl Sync for Address
impl Unpin for Address
impl UnwindSafe for Address
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