HTML reference
p
The <p> element marks a paragraph: a meaningful block of text that develops one idea or closely related ideas.
What you will learn
- What unit a
pelement represents - How it differs from
br - How to separate structure from visual spacing
Basic example
<p>HTML describes the structure of a document.</p>
<p>CSS controls its presentation.</p>Each paragraph is a separate block in the document structure. Browsers add default spacing, but CSS should control the final margins, line height, and width.
p or br?
Use p when the text forms a separate paragraph. Use br for a meaningful line break inside one block, such as a postal address or a line of poetry. Do not add many br elements just to create vertical space.
Use the right element
A heading should use h1–h6, a list should use ul or ol, and a quotation should use the appropriate quote element. Semantic structure helps people and tools understand the page.