Summary -

In this topic, we described about the <p> tag along with detailed example.

Paragraph. HTML paragraphs are defined by using <p> tag. <p> tag can be used to create different paragraphs in wed document.

The paragraph content will go in between opening <p> tag and closing </p> tag. Browsers automatically add a line in between the each paragraph.

The closing tag can be ignored if the <p> element is immediately followed by an <address>, <article>, <aside>, <blockquote>, <div>, <dl>, <fieldset>, <footer>, <form>, <h1>, <h2>, <h3>, <h4>, <h5>, <h6>, <header>, <hgroup>, <hr>, <main>, <nav>, <ol>, <p>, <pre>, <section>, <table>, or <ul>, element.

If any other tag is following except the above, then end tag is mandatory.

Syntax -

<p>.. text here.. </p>

Example -

<!DOCTYPE html>
<html>
	<head>
		<title>Paragraph tag example..</title>
	</head>
	<body>
		<p>First paragraph text here…</p>
		<p>Second paragraph text here…</p>
		<p>Third paragraph text here…</p>
	</body>
</html>

Output -

First paragraph text here…

Second paragraph text here…

Third paragraph text here…