HTML Paragraphs

Paragraphs are defined with the <p> tag. This tag comes in pairs.

Example

<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec non neque nunc.
Nulla a mauris et dui facilisis mattis et vel tortor. Phasellus fermentum mi.
</p>

The paragraph element cannot contain nested paragraph elements or block elements (such as div).

Output

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec non neque nunc. Nulla a mauris et dui facilisis mattis et vel tortor. Phasellus fermentum mi.

Line Breaks

You can force a line break using the <br /> tag.

<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. <br/> Donec non neque nunc.
Nulla a mauris et dui facilisis mattis et vel tortor. Phasellus fermentum mi.
</p>

Output

Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Donec non neque nunc. Nulla a mauris et dui facilisis mattis et vel tortor. Phasellus fermentum mi.

Horizontal Line

You can separate paragraphs with a horizontal line.

<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec non neque nunc.
Nulla a mauris et dui facilisis mattis et vel tortor. Phasellus fermentum mi.
</p>

<hr/>

<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. <br/> Donec non neque nunc.
Nulla a mauris et dui facilisis mattis et vel tortor. Phasellus fermentum mi.
</p>

Output

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec non neque nunc. Nulla a mauris et dui facilisis mattis et vel tortor. Phasellus fermentum mi.


Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Donec non neque nunc. Nulla a mauris et dui facilisis mattis et vel tortor. Phasellus fermentum mi.

You can style paragraphs by using the style attribute. Other paragraph attributes like "align" are depreciated.

See Also

HTML Text