pub struct P;Expand description
The <p> element - paragraph.
§Purpose
The <p> element represents a paragraph of text. It’s one of the most commonly
used HTML elements for organizing textual content into distinct blocks.
§Content Categories
- Flow Content
- Palpable Content
§Permitted Content Model
- Phrasing content (no block-level elements like
<div>,<p>, or headings)
§Common Use Cases
- Body text in articles and documents
- Descriptive text blocks
- Text content in any context
- Structuring prose content
§Key Attributes
- Global attributes only
§Example
<article>
<h1>Introduction to HTML</h1>
<p>HTML (HyperText Markup Language) is the standard markup language
for creating web pages.</p>
<p>It describes the structure of web pages using markup elements
called tags.</p>
</article>§Accessibility
- Screen readers pause between paragraphs
- Natural text structure for reading flow
§WHATWG Specification
Trait Implementations§
Source§impl HtmlElement for P
impl HtmlElement for P
impl CanContain<P> for Hgroup
impl<T: PhrasingContent> CanContain<T> for P
impl CanContain<Text> for P
impl FlowContent for P
impl PalpableContent for P
Auto Trait Implementations§
impl Freeze for P
impl RefUnwindSafe for P
impl Send for P
impl Sync for P
impl Unpin for P
impl UnwindSafe for P
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