Skip to main content
Practice

p Tag

The <p> tag is utilized to insert Paragraphs composed of text into a webpage.

The main characteristics of the p tag are as follows:

  1. Automatic Line Breaks: When the length of the paragraph exceeds the browser's width, the text automatically wraps to the next line.

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

The p tag can be used as shown below:

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

Follow the highlighted sections of the code to practice typing it out.

Want to learn more?

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