본문으로 건너뛰기

<p> Tags in HTML

<p> Tags

The <p> tag is used to insert paragraphs into a webpage.

Key features of the p tag are as follows:

  1. Text Division: Text between the start tag <p> and the end tag </p> is defined as one paragraph on the web page.

  2. Automatic Line Wrapping: If the length of the paragraph exceeds the width of the browser window, the text will automatically wrap to the next line.

  3. No Nesting: You cannot include other elements (such as another <p> tag, <div>, etc.) within a <p> tag. A <p> tag should only contain text.

You can use the p tag like this:

Example of p tags
<p>This is the first paragraph.</p>
<p>This is the second paragraph.</p>

Follow the highlighted parts of the code to try it out.