html源代码显示额外的<p>标签</p>

时间:2013-02-16 06:15:50

标签: html

在这里你会看到持续时间:50小时。现在如果你使用firebug进行调试,你会在50小时后看到额外的<p></p>标签,而在实际的html中,我在p标签内做了“持续时间:50小时”

请指出原因。

2 个答案:

答案 0 :(得分:2)

<h2>标记内包含<p>(或任何其他块级元素)无效。请考虑使用带有边距的<div>代码。

答案 1 :(得分:0)

检查我看到的元素

<p>The course offered by us cover complete and thorough knowledge of Search Engine Optimization, which is essential for the success of online business, Knowledge and understanding of the workings of search engines and the SEO skills that the course develops ensures clear understanding of Search Engine Optimization.
This course gives hands-on experience in the area of Search Engine Optimization and internet marketing.</p>
<p><h2 class="reqmnts">Duration:</h2> 50 Hrs</p>
<p><h2 class="reqmnts">Pre-requisite:</h2> Basic Knowledge of computer & internet</p>

这不是您所描述的,因为<p>标签按顺序放置

 <p><h2 class="reqmnts">Duration:</h2> 50 Hrs</p>
 <p><h2 class="reqmnts">

如您所见,在第二行开头有<p>,与结尾<p>

一致

如果错误是这样,那么:)

要解决此错误,您需要删除文本中的<p>标记,然后只需添加<br>即可将两行分开

相关问题