Lecture

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.

Mission
0 / 1

Which of the following is a key feature of the <p> tag?

Can nest other <p> tags.

Can align paragraphs vertically.

Automatically wraps text to display long texts.

Can change text styles.

Lecture

AI Tutor

Design

Upload

Notes

Favorites

Help

HTML
CSS
Loading...