HTML <p> tag
The <p> tag creates paragraph of the document.
Syntax:
<p>Your text here</p>
How Browser will display
INLINE.
Difference between HTML4.01, XHTML and HTML5
HTML4 | XHTML | HTML5 |
---|---|---|
None | None | HTML5 does not support the align attribute. |
Attributes used with <p> tag
Attribute | Description |
---|---|
align | To align the content in the paragraph to justify, left, right or center. (HTML5 does not support this attribute when it is used with the <p> tag). |
As the align attribute is not supported in HTML5, you can use the CSS Align property.
Note/Warning/Danger/Info/Success Browsers add a line break after the end of the paragraph. They also add margin around the paragraph element.
Global Attributes
The <p> tag supports global attributes.
Event Attributes
The <p> tag supports event attributes.
Supporting Browsers
Related Tags
<div>, <h1>, <h2>, <h3>, <h4>, <h5> or <h6> tags