English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The HTML <p> tag defines a paragraph in an HTML document. This tag is also commonly referred to as the <p> element.
The following code marks a paragraph:
<!doctype html> <html> <head> <meta charset="UTF-8"> <title>HTML p Tag Usage (Basic Tutorial Website oldtoolbag.com)</title>/title> </head> <body> <h1>Heading 1</h1> <p>This is the first paragraph that would appear under Heading 1.</p> <p>This is the second paragraph.</p>/p> </body> </html>Test and see ‹/›
IEFirefoxOperaChromeSafari
Most browsers support the <p> tag at present.
<p> tag defines a paragraph.
<p> is the most commonly used block-level element.
Paragraphs defined with <p> tags have extra spacing before and after the tags.
The <p> element automatically creates some space before and after it. Browsers automatically add these spaces, and you can also specify them in the style sheet.
HTML 4.01The align attribute of the middle tag has been deprecated, the difference in HTML5This attribute is not supported.
Attribute | Value | Description |
---|---|---|
align | left right center justify | HTML5Not supported. HTML 4.01Deprecated. Not recommended. Use styles instead. Specifies the alignment of the text within the paragraph. |
<p> tag supports global attributes, see the complete attribute table HTML Global Attributes.
<p> tag supports all HTML Event Attributes.
HTML Tutorial:HTML Paragraph