元素“P”开了! [英] Element "P" IS open!

查看:82
本文介绍了元素“P”开了!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨组,


有谁知道为什么我得到W3验证器错误(点击页面底部的验证

链接)
http://www.polisource.com/consumer-protection.shtml 说第227行,

第3列:元素的结束标记P这是不公开的。在桌面标签之前,我看起来很开心。也许这就是为什么验证器在测试版中仍然是
,但我想我会问。

解决方案
"百里" < BA *** @ polisource.com>写道:

有谁知道为什么我得到W3验证器错误(点击页面底部的验证链接)
http://www.polisource.com/consumer-protection.shtml 说第227行,




在HTML中,<结束标记为< p为H.是可选的,并且由

开始暗示任何块级元素。所以...


< p> ...< table> ...< / table> ...< / p>以HTML格式阅读

< p> ...< / p>< table> ...< / table> ...< / p>它有一个不需要的结束标签

验证器报告。


此外,即使是像XHTML这样的语言也没有任何

可选的结束标记,< table>不能包含在< p>中。


-

Chris


" Barry" ; < BA *** @ polisource.com>写道:

有谁知道为什么我得到一个W3验证器错误(点击页面底部的验证链接)
http://www.polisource.com/consumer-protection.shtml 说Line 227,
第3列:元素P的结束标记这是不公开的。


是的,你有一个段落的结束标记,但没有开头标记。

错误报告是正确的。删除那个迷路结束标签。

看起来对我来说,就在桌面标签之前。




不,这是一个不同的段落。由于段落元素不能包含表格元素,因此只要表格开始,该段落就会隐式关闭。因此,桌子后面的结束标签没有配对

带有任何开口标签。


Steve


-

我的理论给你起见,我的异端邪说你愤怒,

我从不回信,你不喜欢我的领带。 - 医生


Steve Pugh< st *** @ pugh.net> < http://steve.pugh.net/>


Barry schrieb:

嗨组,
有谁知道为什么我得到W3验证器错误(点击页面底部的验证链接)
http://www.polisource.com/consumer-protection.shtml 说第227行,
第3栏:元素P的结束标记这是不公开的。在桌面标签之前,我看起来很开放。也许这就是为什么验证器仍处于测试阶段,但我想我会问。




我带走了< p> ......< / p>围绕< table> ...< / table>

现在它有效。


问候


Werner


-

----------------------------- ---------------------

Werner Partner,45699 Herten
http://www.sonoptikon.de


Hi group,

Does anyone know why I get a W3 validator error (click the validation
link at the bottom of the page) for
http://www.polisource.com/consumer-protection.shtml saying "Line 227,
column 3: end tag for element "P" which is not open." It looks open to
me, right before the table tag. Maybe that''s why the validator is still
in beta, but I thought I''d ask.

解决方案

"Barry" <ba***@polisource.com> writes:

Does anyone know why I get a W3 validator error (click the validation
link at the bottom of the page) for
http://www.polisource.com/consumer-protection.shtml saying "Line 227,
column 3: end tag for element "P" which is not open." It looks open to
me, right before the table tag. Maybe that''s why the validator is still
in beta, but I thought I''d ask.



In HTML the end tag for <p> is optional, and implied by the start of
any block level element. So...

<p>...<table>...</table>...</p> is read in HTML as
<p>...</p><table>...</table>...</p> which has the unwanted closing tag
that the validator reports.

Additionally, even in a language like XHTML that doesn''t have any
optional end tags, <table> cannot be contained within <p>.

--
Chris


"Barry" <ba***@polisource.com> wrote:

Does anyone know why I get a W3 validator error (click the validation
link at the bottom of the page) for
http://www.polisource.com/consumer-protection.shtml saying "Line 227,
column 3: end tag for element "P" which is not open."
Yep, you''ve got the end tag for a paragraph but no opening tag. The
error report is correct. Delete that stray end tag.
It looks open to me, right before the table tag.



No, that''s a different paragraph. As paragraph elements can not
contain table elements the paragraph is implicitly closed as soon as
the table starts. Hence the end tag after the table isn''t paired up
with any opening tag.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don''t like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>


Barry schrieb:

Hi group,

Does anyone know why I get a W3 validator error (click the validation
link at the bottom of the page) for
http://www.polisource.com/consumer-protection.shtml saying "Line 227,
column 3: end tag for element "P" which is not open." It looks open to
me, right before the table tag. Maybe that''s why the validator is still
in beta, but I thought I''d ask.



I took away the <p> ... </p> around the <table> ... </table>
Now it''s valid.

regards

Werner

--
--------------------------------------------------
Werner Partner, 45699 Herten
http://www.sonoptikon.de


这篇关于元素“P”开了!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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