<p>Usage of tag in HTML: Create line breaks in HTML documents. Just insert the tag where you want a line break. NOTE: It does not automatically add spacing or vertical space, CSS styling is required.
<p>

<p>
Usage of
tag in HTML
<p>
Function of tag The
<p>
tag is used to create line breaks in HTML documents. It is an empty element, which means it has no closing tag.
<p>
Usage of tags
<p>To use the
tag, just insert it where a line break is required. For example:
<p>第一段文字。<br>
第二段文字。</p>
Copy after login
<p>The above code will create the following output:
<p>First paragraph of text.
The second paragraph of text.
<p>
Note
-
Tags do not automatically add any spacing or vertical space. To add vertical spacing, you can use CSS styles such as margin
or padding
. The
-
tag should not be confused with the <p>
paragraph tag. Paragraph tags create new paragraphs, while line break tags only insert line breaks.
- In some cases, using the CSS style
white-space: nowrap
can disable the wrapping effect of the
tag.
The above is the detailed content of Usage of br tag in html. For more information, please follow other related articles on the PHP Chinese website!