HTML P Element: Here’s The Code To Identify Paragraph Text
Element ofLearn How Fonts And Web Typography Work In HTML: A Beginner’s GuideWhat does HTML P Element: Here's The Code To Identify Paragraph Text do?The <p> element is used to identify blocks of paragraph text. The closing <p> tag is optional and is implied by the opening tag of the next HTML element encountered in an HTML document after an opening <p> tag.DisplayinlineUsagetextual
Code Example
<p>Here's how to define a paragraph in HTML.</p>
Here’s how to define a paragraph in HTML.
Basic Text Formatting
If you’re new to HTML, <p> is likely to be the first element that you encounter. It defines a paragraph of text.
The end of the paragraph is marked by a closing </p> tag. Technically this is optional, but it’s good practice to include the closing tag to ensure your document validates.
By default, most browsers place a line break and a blank line between paragraphs.
Browser Support for p
![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| All | All | All | All | All | All |
Attributes of p
| Attribute name | Values | Notes |
|---|---|---|
| clear | Was used to force a paragraph to appear below sibling elements rather than next to sibling elements within a parent element. |





