What is the difference between div, br and p in CSS
This article mainly introduces the relevant knowledge of "what is the difference between div, br and p in CSS". The editor shows you the operation process through an actual case. The operation method is simple, fast and practical. I hope this article "what is the difference between div, br and p in CSS" can help you solve the problem.
I. grammatical differences
Div and p are pairwise combinations of closed tags
There are a lot of closed labels.
End with a split in the face
To
Preliminary
End of story
Small example:
Content one form two
The first paragraph
The second paragraph
Screenshot of achievements:
Screenshots of the usage of div and p tags
Second, the sense of attainments is different
The div tag and the p tag are used for web pages.
Div is an ordinary structural tag, which is organized like the span tag. Setting the CSS style of DIV can achieve the effectiveness of content organization.
The p tag is a paragraph tag and is generally used for article segmentation.
Br tags are used for content wrapping. For example, the form of pen and ink is changed, typesetting and persuasion.
Br is roughly arranged to be used in div and p, while div may also be used in p, and p is also used in div.
Small example:
I am in the div tag and the font color is red.
I am the first paragraph of the article.
I am the content of the second paragraph.
I am the third paragraph article mode, I am changed, I am also changed by br.
Screenshot of the effect:
This is the end of the content about "what is the difference between div, br and p in CSS". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.