在标头元语句中使用标签 [英] Use of tags in header meta statements

查看:53
本文介绍了在标头元语句中使用标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在XHTML文档中,我发现W3 Validator对我的

标题提出异议而没有实际使文档无效。


不在< title> ;< / title>,但在meta name =" abstract"和

name =" description"我发现包含< q>< / q>被W3验证者反对

。我被告知<<是分隔符的第一个字符,

但是作为数据出现。


我很难理解这一点很重要。是否<"

肯定要避免(通过使用for double quotes),或者应该

这个警报只是被忽略,因为文档确实验证了OK ?


我认为无论答案是什么,都适用于< span>< / span>
<

br $> b $ b -

Haines Brown
br **** @ hartford -hwp.com
kb****@arrl.net
www.hartford-hwp.com

In XHTML docs, I find that the W3 Validator raises an objection to my
headers without actually invalidating the document.

Not in <title></title>, but in meta name="abstract" and
name="description" I find that the inclusion of <q></q> is objected to
by the W3 validator. I''m told "< is first character of a delimiter,
but occurred as data."

I''m having trouble understanding this is significant. Is the "<"
definitely to be avoided (by using " for double quotes), or should
this alert simply be ignored because the document does validate OK?

I assume that whatever the answer is would apply as well to such
things as <span></span>

--
Haines Brown
br****@hartford-hwp.com
kb****@arrl.net
www.hartford-hwp.com

推荐答案

Haines Brown< br **** @ hartford-hwp.com>写道:
Haines Brown <br****@hartford-hwp.com> writes:
在XHTML文档中,我发现W3 Validator对我的标题提出异议而没有实际使文档无效。

不在< title>< / title>中,但在meta name =" abstract"和
name =" description" I发现包含< q>< / q>被W3验证者反对。我被告知<<是
分隔符的第一个字符,但是作为数据出现。
In XHTML docs, I find that the W3 Validator raises an objection to
my headers without actually invalidating the document.

Not in <title></title>, but in meta name="abstract" and
name="description" I find that the inclusion of <q></q> is objected
to by the W3 validator. I''m told "< is first character of a
delimiter, but occurred as data."




我不确定我是否得到了你的''说,但我认为你有

类似


< meta name =" description" content =" foo< q> bar< / q> baz" /> ;.


这是无效的;您不能在属性值中包含元素。在

中,在一个属性

值中根本不允许使用小于号的符号;它由& lt;表示或者由一个角色

参考。


您将不得不使用引号字符而不是q

元素,类似于


< meta name =" description" content =''foo" bar" baz''>。

属性值缺乏结构是公认的问题,并且建议在XHTML 2中元元素将不是空的:

你将能够写出


< meta name =" description"> foo< q> bar< / q> ; baz< / meta> ;.


这也是< object> ...< / object>的原因之一优于

< img alt =" ..." /> ;.


-

迪恩Tiegs,NE ?? - 20-52-25-W4

a ?? Confortare et esto robustusa ??
http://telusplanet.net/public/dctiegs/


文章< m2 ** **********@hartford-hwp.com> ;,无限猴子之一

在Haines Brown的键盘上< br **** @ hartford-hwp.com>写道:
In article <m2************@hartford-hwp.com>, one of infinite monkeys
at the keyboard of Haines Brown <br****@hartford-hwp.com> wrote:
在XHTML文档中,我发现W3 Validator对我的
标题提出异议而没有实际使文档无效。
In XHTML docs, I find that the W3 Validator raises an objection to my
headers without actually invalidating the document.




我不知道你的意思。请发一个演示

的网址。


-

Nick Kew


迫切需要付费工作 - 请参阅 http ://www.webthing.com/~nick/cv.html


Haines Brown< br **** @ hartford-hwp.com>写道:
Haines Brown <br****@hartford-hwp.com> writes:
谢谢。了解。但我想知道,因为< title> ...< / title>是一个
容器,怎么引用?我假设我不能使用引号
因为它是保留字符,但我可以使用< q>< / q> ;?或者做
我必须:

< title> foobarbaz< / title>


字符<">在这种情况下不保留; < title> foo" bar"

baz< / title>完全没问题。唯一的地方<">保留在

属性值中,由<">分隔。元素title在XHTML中可以包含

字符数据但没有元素的少数元素(可能是唯一一个?)中的一个是


我倾向于而是使用:

< meta name =" description" content =" foo''bar''baz">

会有什么区别吗?


不是真的,只需按照您的个人(或国家)偏好

何时使用单引号或双引号。

我认为我也可以使用:

< meta name =" description" content =" foobarbaz>

甚至:

< meta name =" description" content =" foobarbaz>


是的,两者都可以。

什么时候XHTML 2才可用?


不要屏住呼吸。 XHTML 1还不是真的可用,因为

最受欢迎的浏览器并不支持它。

Dean Tiegs< da ******* @ telus。净>写道:
Thanks. Understood. But I wonder, since <title>...</title> is a
container, how does one quote? I assume I can''t use a quotation mark
because it is a reserved character, but could I use <q></q>? Or do
I have to:

<title>foo "bar" baz</title>
The character <"> is not reserved in this context; <title>foo "bar"
baz</title> is perfectly OK. The only place <"> is reserved is in an
attribute value that is delimited by <">. The element "title" is one
of the few elements (maybe the only one?) in XHTML that can contain
character data but no elements.
My inclination instead would be to use:

<meta name="description" content="foo ''bar'' baz">

Would there be any difference?
Not really, just follow your personal (or national) preference for
when to use single or double quotation marks.
I assume that I could perfectly well also use:

<meta name="description" content="foo "bar" baz">

or even:

<meta name="description" content="foo “bar” baz">
Yes, both are OK.
when is XHTML 2 going to be usable?
Don''t hold your breath. XHTML 1 is not really usable yet because the
most popular browser doesn''t support it.
Dean Tiegs <da*******@telus.net> writes:
这也是< object> ...< / object>的原因之一优于
< img alt =" ..." />。
This is also one of the reasons <object>...</object> is superior to
<img alt="..."/>.



非常有趣。你现在真的推荐这个吗?



Very interesting. Are you actually recommending this at present?




不,领先的浏览器都没有正确支持它。我在某些文件中使用了它b / b
当我不在乎如何为其他人渲染时,

但是对于我的真实而言我坚持使用img元素。


-

Dean Tiegs,NE ?? - 20-52-25-W4

a ?? Confortare et esto robustusa ??
http://telusplanet.net / public / dctiegs /


这篇关于在标头元语句中使用标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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