In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "what is the difference between p-tag and div tag in CSS". In daily operation, I believe that many people have doubts about the difference between p-tag and div tag in CSS. The editor consulted all kinds of data and sorted out a simple and easy-to-use method of operation. I hope it will be helpful to answer the question of "what is the difference between p-tag and div tag in CSS". Next, please follow the editor to study!
Css attribute judgement
1. Structural gap
Div and p are a pair of opening and closing tags.
Div starts with a pair of tags that ends with a split.
P to
The first stage, in order to
A pair of labels for the end.
2. The difference of weighing theory
Div is a structural frame tag
P is a paragraph tag, an agency article tag.
3. Div and p basic css attributes
Both div and p occupy a single line of block element tags, only distinguishing that p has its own fixed margin-top and margin-bottom attribute values, while div has two attribute values of 0, that is, there is not a certain gap between the two p, while div does not.
Div has no partition spacing, while p has.
P has its own spacing between rows, while div has no upper and lower distance.
From the example diagram above, we can see that there is a partition between div and p. The p interval is affected by the line-height line height, so the line height is small, the line height value is large, then the high and low paragraph p isolation distance is large.
At this point, the study on "what is the difference between the p tag and the div tag in CSS" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.