简体   繁体   English

css div 和段落的更好选择

[英]Better option with css div and paragraph

I have a typical code review item where I am requested to use paragraph instead of all divs in my UI code.我有一个典型的代码审查项目,要求我在 UI 代码中使用段落而不是所有 div。 I am beating my head to trace why was this so important.我正在努力追查为什么这如此重要。 As p tag more faster than div tag?因为 p 标签比 div 标签更快? adding styles to paragraph or div will take same amount of time?将样式添加到段落或 div 将花费相同的时间? This review items seems to be very bad but I want to know if this item is 100% valid?这个评论项目似乎很糟糕,但我想知道这个项目是否 100% 有效?

There is no difference in SEO for <p> and <div> tags. <p><div>标签的 SEO 没有区别。 You should build your site in the way that makes the most sense: <p> for paragraphs, <div> for structural div elements.您应该以最有意义的方式构建您的网站: <p>表示段落, <div>表示结构 div 元素。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM