Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / HTML

The p element — paragraph

The p element represents an HTML paragraph. It contains phrasing content, not arbitrary structural elements; its appearance does not define its meaning.

Version: WHATWG HTML Living Standard; index snapshot date recorded separately

Syntax

<p>...</p>

The p element represents a paragraph. It belongs to the flow content and palpable content categories. It can appear where flow content is expected and as a child of hgroup.

Its contents must be phrasing content. Do not nest p, div, ul, or ol inside it; place a list outside the paragraph. The element supports global attributes.

In text/html syntax, the end tag can be omitted only in specified situations, such as before another p. Explicit closing tags make code easier to read. Spacing is presentation, not meaning. When a more appropriate semantic element exists, choose it instead of p.

Examples

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Paragraphs</title>
</head>
<body>
  <p>First paragraph.</p>
  <p>Second paragraph.</p>
</body>
</html>

Result

First paragraph.

Second paragraph.

The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.

Sources