Elements – P Tag

P Tag

The <p> tag stands for paragraph, which is the most common tag used to create lines of words inside the <html> document. Using <p> will be very useful to add the margin automatically between elements. The <p>attribute can also be helpful for CSS styling.

P tag with other tags

The use of the <p> is compatible with other tags, allowing to add hyperlinks (<a>), bold (<strong>), italics(<i>) among others.


<html> <head> <title>Paragraph example</title> </head> <body> <p> This <strong>sentence</strong> was created to show how the paragraph works. </p> </body> </html>

You can also nest an anchor element <a> within a paragraph.


<p>Here's a <a href="http://Codevarsity.com">link to Free Code Camp.com</a> for you to follow.</p>

More Information:

This article needs improvement. You can help improve this article. You can also write similar articles and help the community.