放入< p>是否好?里面< td>把内容文字? [英] Is it good to put <p> inside <td> to put content text?

查看:338
本文介绍了放入< p>是否好?里面< td>把内容文字?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

哪一种语义更有效?

Which is more semantic and valid?

<td> 
<p>
 content text
</p>
</td>

<td> 
 content text
</td>


推荐答案

省略< p> 标记,除非您的表格单元格的内容真正是段落。当然可以在表格数据中有段落,并且在这种情况下,可以适当地放置语义< p> 。但是对于单元格中包含数据的公共表格。数字,名字等,不包括< p>

Leave out the <p> tag unless the content of your table cell is truly a paragraph. It's certainly possible to have paragraphs in tabular data, and in that case a semantic <p> would be appropriately placed. But for the common table with data in the cells eg. numbers, names, etc., don't include the <p>.

这篇关于放入&lt; p&gt;是否好?里面&lt; td&gt;把内容文字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆