HTML p element

HTML <p> tag defines paragraphs. paragraph always starts on a new line. This is a block level element.

<p>This is a single paragraph. It is a block level element</p>
<p>This is a second paragraph as an example.</p>
</>

This is a single paragraph. It is a block level element

This is a second paragraph as an example.

Tip: If more suitable elements are available to write the content, then we should not use paragraph element.

Tag omission

The closing tag (</p>) may be omitted.

Global Attributes

All the global attributes are applicable on the p tag.


If you want to know that what is the structure of the web page. And what kind of elements have been used to make the page? You can view page source. To view page source press right click then select view page source.



Was this article helpful?

 

Email:

Message: