pub struct Sup;Expand description
The <sup> element - superscript.
§Purpose
The <sup> element represents superscript text, which appears half a character above
the normal line and is often rendered in a smaller font. Used for exponents, ordinal
indicators, and footnote markers.
§Content Categories
- Flow Content
- Phrasing Content
- Palpable Content
§Permitted Content Model
- Phrasing content
§Common Use Cases
- Mathematical exponents (x², 10³)
- Ordinal indicators (1st, 2nd, 3rd)
- Footnote or reference markers
- Trademark symbols (™, ®)
§Key Attributes
- Global attributes only
§Example
<p>Einstein's equation: E = mc<sup>2</sup></p>
<p>Area of a square: side<sup>2</sup></p>
<p>On the 21<sup>st</sup> of March...</p>
<p>Copyright<sup>©</sup> 2024</p>§WHATWG Specification
Trait Implementations§
Source§impl HtmlElement for Sup
impl HtmlElement for Sup
impl<T: PhrasingContent> CanContain<T> for Sup
impl CanContain<Text> for Sup
impl FlowContent for Sup
impl PalpableContent for Sup
impl PhrasingContent for Sup
Auto Trait Implementations§
impl Freeze for Sup
impl RefUnwindSafe for Sup
impl Send for Sup
impl Sync for Sup
impl Unpin for Sup
impl UnwindSafe for Sup
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