Skip to main content
Crowdfunding
Python + AI for Geeks
Practice

p Tag

The <p> tag is used to insert text-based paragraphs into a web page.

Here are the main features of the p tag:

  1. Automatic Line Breaks: If the paragraph's length exceeds the browser's width, the text will automatically break into the next line.

  2. No Nesting Allowed: You cannot include other elements (e.g., another <p> tag, <div>, etc.) within a <p> tag. Only text should be included within a <p> tag.

You can use the p tag as shown below.

p Tag
<p>First paragraph</p>
<p>Second paragraph</p>

Follow the highlighted parts of the code to practice.

Want to learn more?

Join CodeFriends Plus membership or enroll in a course to start your journey.