Home >Web Front-end >HTML Tutorial >What is the difference between div, br and p in html?
The content of this article is about the difference between div br p in HTML. It has certain reference value. Friends in need can refer to it. I hope it will help You helped.
p and p are paired closing tags;
is a single closing tag. Start with
and end with
; start withand end with
Small example:
<p>内容一</p> <p>内容二</p> <p>第一段</p> <p>第二段</p>
Effect screenshot:
p tag and p tag are used for web page layout.
p is a common layout tag, which layouts content like a span tag. Setting the CSS style of p can achieve the content layout effect. The
p tag is a paragraph tag, usually used for article segmentation. The
br tag is used for content line breaks. For example, the function of text wrapping and typesetting.
br can be placed in p and p. At the same time, p can also be placed in p, and p can also be placed in p.
Small example:
<p style="color:red">我在p标签内,字体颜色为红色</p> <p>我是第一段文章内容</p> <p>我是第二段文章内容</p> <p>我是第三段文章内容<br />我被换行<br/>我也被br换行</p>
Effect screenshot:
The above is the complete introduction, if you want To learn more about HTML video tutorial, please pay attention to the PHP Chinese website.
The above is the detailed content of What is the difference between div, br and p in html?. For more information, please follow other related articles on the PHP Chinese website!