pub struct Em;Expand description
The <em> element - emphasis.
§Purpose
The <em> element represents stress emphasis of its contents. The level of emphasis
can be increased by nesting <em> elements. Typically rendered in italic, but the
emphasis is semantic, not just visual.
§Content Categories
- Flow Content
- Phrasing Content
- Palpable Content
§Permitted Content Model
- Phrasing content
§Common Use Cases
- Emphasizing important words or phrases
- Changing the meaning based on stress
- Highlighting key terms in context
§Key Attributes
- Global attributes only
§Example
<p>I <em>really</em> need to finish this today.</p>
<p>Cats are <em>cute</em> animals.</p>
<p>Make sure you <em>do not</em> forget!</p>§Accessibility
- Screen readers may use different voice inflection
- Conveys semantic emphasis, not just styling
§WHATWG Specification
Trait Implementations§
Source§impl HtmlElement for Em
impl HtmlElement for Em
impl<T: PhrasingContent> CanContain<T> for Em
impl CanContain<Text> for Em
impl FlowContent for Em
impl PalpableContent for Em
impl PhrasingContent for Em
Auto Trait Implementations§
impl Freeze for Em
impl RefUnwindSafe for Em
impl Send for Em
impl Sync for Em
impl Unpin for Em
impl UnwindSafe for Em
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