English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Основной учебник HTML

HTML media

HTML reference manual

HTML5 basic tutorial

HTML5 API

HTML5 media

Параграфы HTML

HTML can divide a document into several paragraphs. The content of the article is usually also composed of multiple paragraphs.

Параграфы HTML

Paragraphs are defined by the <p> tag.

<p>This is the first paragraph (oldtoolbag.com)</p><p>This is the second paragraph</p>
Test to see <‹/›

Note:</p> is a block-level element, the browser will automatically add blank lines before and after the paragraph.

Do not forget to close the tag

Of course, even if you forget to use the closing tag, most browsers will display HTML:

<p>This is the first paragraph
<p>This is the second paragraph
Test to see <‹/›

The above example will work in most browsers, but do not use this method. Forgetting to use the closing tag can cause unpredictable errors, resulting in misplaced page content and affecting page layout, etc.

Note: Do not forget to close the tag

HTML line breaks

If you just want to break text content, not a new paragraph, use <br>or<br /> Tags for line breaks:

<p>This is a<br>normal line break in a paragraph<br>Here the effect of line breaks is demonstrated</p>
Test to see <‹/›

The <br /> element is an empty HTML element. Since the closing tag has no meaning, it does not have an end tag

HTML output - using alerts

We cannot determine the exact effect of HTML being displayed. The size of the screen, and adjustments to the window, can lead to different results.

For HTML, you cannot change the output effect by adding extra spaces or line breaks in the HTML code.

When displaying the page, the browser removes extra spaces and blank lines from the source code. All consecutive spaces or blank lines are counted as one space. It should be noted that all consecutive blank lines (line breaks) in HTML code are also displayed as one space.

Try it out

(This example demonstrates some possible formatting issues that may be encountered with HTML).

Examples on this site

Параграфы HTML
How to display HTML paragraphs in a browser.

HTML line breaks
Using line breaks in an HTML document.

Typing a poem in HTML
When displaying HTML code, the browser automatically omits extra whitespace characters, spaces, and line breaks from the source code).

More examples

More paragraphs
DEFAULT BEHAVIOR OF THE PARAGRAPH

Руководство по тегам HTML

Руководство по тегам HTML предоставляет дополнительную информацию о элементах HTML и их атрибутах.

ТегОписание
<p>Определение абзаца
<br>Вставка одной отступа (ENTER)