Skip to main content

The <p> Element

As defined in the HTML Living Standard, the <p> element represents a paragraph. A paragraph is typically a block of text that consists of one or more related sentences, but it can also be used for other groupings of related phrasing content.

Visual Example:

This is the first paragraph. It introduces a concept and provides the initial context for the user to understand.

This is the second paragraph. It expands on the idea, moving the narrative or information forward in a logical sequence.

<p>This is a standard paragraph of text.</p> <p>Each paragraph should focus on a single theme.</p> View HTML Living Standard: The p element

Nesting Constraints

The <p> element has strict rules regarding what it can contain. It can only contain phrasing content (text, images, links, etc.).

WCAG Requirement: Info and Relationships

Success Criterion 1.3.1 (Level A): Information, structure, and relationships conveyed through presentation can be programmatically determined.

Paragraphs are fundamental structural units. Screen reader users can navigate through a document paragraph by paragraph (often using the 'P' key). By using the <p> tag instead of <br><br> to separate text, you ensure that assistive technology understands where one idea ends and another begins.

Understand SC 1.3.1: Info and Relationships

Styling vs. Markup

Following SMACSS Base Rules, you should control the appearance of paragraphs through CSS rather than HTML hacks.

A11y Tip: Empty Paragraphs

Avoid using empty <p></p> elements to create visual space. Screen readers may announce "paragraph" for each empty tag, creating a confusing and stuttered experience for the user. Always use CSS for purely presentational spacing.