A paragraph is marked up as follows:
More "Try it Yourself" examples below.
The <p> tag defines a paragraph.
Browsers automatically add some space (margin) before and after each <p> element. The margins can be modified with CSS (with the margin properties).
Element | |||||
---|---|---|---|---|---|
<p> | Yes | Yes | Yes | Yes | Yes |
The align attribute is not supported in HTML5.
Attribute | Value | Description |
---|---|---|
align | left right center justify |
Not supported in HTML5. Specifies the alignment of the text within a paragraph |
The <p> tag also supports the Global Attributes in HTML.
The <p> tag also supports the Event Attributes in HTML.
More paragraphs
Some default behaviors of paragraphs.
Poem problems
Examples of how you can NOT write a poem in HTML.
HTML tutorial: HTML Paragraphs
HTML DOM reference: Paragraph Object
Most browsers will display the <p> element with the following default values: