Skip to main content

🙋🏻 HTML Paragraph

HTML paragraphs are defined with the <p> tag. The <p> tag defines a paragraph of text. It is used to group a block of text together.

index.html
<!DOCTYPE html>
<html>
<head>
<title>Paragraph Example</title>
</head>
<body>
<h1>This is a Heading</h1>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
</body>
</html>
http://.../index.html

This is a Heading

This is a paragraph.

This is another paragraph.

In the example above, the <p> tag defines two paragraphs of text. The first paragraph contains the text "This is a paragraph." The second paragraph contains the text "This is another paragraph."

tip

Use HTML paragraphs to group a block of text together. Paragraphs are used to separate blocks of text and make the content easier to read.

Best Practice:

  • Use the <p> tag to define paragraphs of text.
  • Use paragraphs to separate blocks of text and make the content easier to read.
  • A paragraph always starts on a new line. If you want to display text on the same line, use the <span> tag.

Summary

HTML paragraphs are defined with the <p> tag. The <p> tag defines a paragraph of text. It is used to group a block of text together. Use HTML paragraphs to separate blocks of text and make the content easier to read. A paragraph always starts on a new line. If you want to display text on the same line, use the <span> tag.