As with any text-centric document, the paragraph is a rather crucial formatting tool. In HTML, the paragraph tag specifies a block of text that should be treated as a singular element, as well as allowing for the appropriate spacing when rendered within the browser. In this tutorial you will learn how to use and where to place the paragraph tag in your HTML document.

The HTML

This is a sample HTML page that uses paragraph tags:

For our sample HTML document, you can see that there is a Header element placed above the paragraph tag, which is then followed by a second paragraph. By default, the paragraph tag will create a space below the closing tag, which will separate our two paragraphs when displayed in the browser.

A Few Last Words

When it comes to HTML, semantics are really everything. Making sure your pages are well formed will make revisiting your code easier later on, and will keep your HTML pages standards compliant. The paragraph tag should not just be thought of as a quick method of formatting (although it is), but rather a means in which to further encapsulate and label content on the document level.
Download Source Files