Usage of br tag in html

下次还敢
Release: 2024-04-27 21:48:14
Original
1236 people have browsed it
<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>
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!

Related labels:
css
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!