Home  >  Article  >  Web Front-end  >  Usage of br tag in html

Usage of br tag in html

下次还敢
下次还敢Original
2024-04-27 21:48:141266browse
<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>Usage of br tag in html

<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:

<code class="html"><p>第一段文字。<br>
第二段文字。</p></code>
<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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:Usage of id in htmlNext article:Usage of id in html