Learn HTML paragraph - HTML Tutorial

HTML paragraph


HTML can divide a document into paragraphs.


HTML Paragraphs

HTML paragraph

Paragraphs are defined by <p> tags.

<p> This is a paragraph </ p>
<p> This is another paragraph </ p>
Note: The browser will automatically add blank lines before and after the paragraph. (</ P> is a block-level element)


Don't forget the closing tag

Even if you forget to use the closing tag, most browsers display the HTML correctly:
<p> This is a paragraph
<p> This is another paragraph
The above example is fine in most browsers, but don't rely on this approach. Forgetting to use end tags can produce unexpected results and errors.
Note: Omitting end tags is not allowed in future versions of HTML.

HTML wrapping

If you want to wrap (newline) without generating a new paragraph, use the <br /> tag.
In the HTML language, the <br /> tag is defined as a newline character, which can be understood as simply entering a blank line instead of segmenting the content:
This br paragraph br demonstrates the effect of branches </ >
<br /> The element is an empty HTML element. Since closing a tag doesn't make any sense, it doesn't have an ending tag.

HTML output-Reminder

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

For HTML, you cannot change the effect of the output by adding extra spaces or line breaks in the HTML code.
When the page is displayed, the browser removes extra spaces and blank lines in the source code. All consecutive spaces or blank lines are counted as one space. Note that all consecutive blank lines (line breaks) in the HTML code are also displayed as a single space.

HTML tags 

Lable Description
 <p> Define a paragraph
<br> Insert a single line break (line break)

HTML Basic Tags
HTML Editors
HTML Introduction
HTML Attributes
HTML Titles