The HTML paragraph tag (<p>
) is used to define a block of text as a paragraph. It is a fundamental part of web development and helps structure content by grouping related sentences or thoughts together.
Syntax:
<p>This is a paragraph.</p>
Characteristics:
- Block-level element: It creates a new block of content, adding a line break before and after the paragraph.
- Default spacing: Browsers usually add some space above and below paragraphs to visually separate them from other content.
- Can include inline elements: You can add inline elements like links, bold, and italic text inside paragraphs.
Example:
<!DOCTYPE html>
<html>
<title>Paragraph Example</title>
<body>
<p>This is a HTML Paragraph Tag Example.</p>
</body>
</html>
See in Fig: