The <p> tag will help to structure your content into the next paragraphs. Each paragraph of the content should be given in between the opening <p> and closing <p> tag as given down in this article on P tag in HTML.
Specific Attributes pf P tag in HTML
In HTML <p> tag also supports the following additional attributes mentioned below in the table.
Attribute | Value | Description |
Align | Left Right Center Justify | This specifies the content alignment within the paragraph. |
Basically, the p tag in HTML defines the paragraph of the content. Let’s have a look at an example of p tag in HTML
<!DOCTYPE html> <html> <head> <title> Example for Paragraph </title> </head> <body> <p>This is the first paragraph of the content given here.</p> <p>This is the second paragraph of the content given here.</p> <p>This is the third paragraph of the content given here.</p> </body> </html>
Output:
The above-mentioned code represents the <p> tag for which it is used in all kind of differentiating the paragraphs. In HTML these tags are used accordingly and is a user-friendly and it help’s the user to get their web page as their wish. We can alter the code and get it done as per our requirements.
Further can be added to the other tags and make your web page more attractive. HTML <p> tag has the opening and the closing tag where the content can me entered and get the different paragraphs if needed. This <p> tag in HTML is the basic tag.
You can go through it briefly by giving your own examples and changing all the tags and making it more fun. Although <p> tag is commonly used everywhere on creating the web page.
<!DOCTYPE html> <html> <head> <title> HTMl p Tag </title> </head> <body> <p>This paragraph is defined using the p tag in HTML.</p> </body> </html>
Output:
With this, we come to an end of this p tag in HTML blog. Now you know how to define paragraphs in HTML.
Check out our Full Stack Web Developer Masters Program which comes with instructor-led live training and real-life project experience. This training makes you proficient in skills to work with back-end and front-end web technologies. It includes training on Web Development, jQuery, Angular, NodeJS, ExpressJS, and MongoDB.
Got a question for us? Please mention it in the comments section of this article and we will get back to you.