The <p> element is used to mark a block of text as paragraph. It has both opening and closing tags. Opening tag can contain different style attributes. Most browser can display the output correctly with out using the closing </p> tag. But it is good coding practice to use both opening and closing tags. Browser automatically adds an empty line before and after paragraph.
We will write a program to demonstrate the p tag.
<title>Program to demonstrate p tag</title>
<p>This is a paragraph. This paragraph is created by Subrat Sir for demoo purpose.</p>
Check your progress:
Q) Use of closing </p> tag is not a good practice.
Q) Browser automatically adds an empty line before and after paragraph.
Q) You should use only one paragraph element with in a document.