HTML Tutorial

HTML Tag: <p>

Usage:

  • The <p> (paragraph) tag represents a paragraph of text.
  • It creates a new line of text and adds vertical space around the paragraph.

Attributes:

  • align: Aligns text (left, right, center, justify)
  • style: Applies CSS styles to the paragraph

Examples:

<p>This is a paragraph.</p>
<p align="center">Centered paragraph.</p>
<p style="color: red;">Red paragraph.</p>

Exploring the <p> Tag:

<!DOCTYPE html>
<html>
<body>
  <p>Paragraph 1</p>
  <p align="center">Paragraph 2</p>
  <p style="color: blue;">Paragraph 3</p>
</body>
</html>

Output:

Paragraph 1

Paragraph 2 (centered)

Paragraph 3 (blue color)