链接到外部样式表 [英] Linking to external stylesheets

查看:74
本文介绍了链接到外部样式表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我总是使用以下行链接到外部样式表:


< link rel =" stylesheet" HREF ="&的style.css QUOT; type =" text / css">


我最近安装了Firefox的HTMLTidy扩展程序,它反对

到该行,说:


"访问:[13.2.1.2]:缺少元数据(链接元素)

优先级2

原因:

如果通过link元素指定元数据,则其值应为

URI。它不应该用于访问样式表。


这对我来说毫无意义 - HTML 4.01规范

显示< link>用于访问外部样式表。此外,来自

这个指南的起源,因为它比WCAG更具体化

13.2?


-

萨法拉(Stephen Morley)
http:// www。 safalra.com/hypertext/

I''ve always linked to external stylesheets using a line like:

<link rel="stylesheet" href="style.css" type="text/css">

I recently installed the HTMLTidy extension for Firefox and it objected
to that line, saying:

"Access: [13.2.1.2]: Metadata missing (link element)
Priority 2
Cause:
If metadata is specified via the link element its value should be a
URI. It should not be used to access style sheets."

This makes no sense to me whatsoever - the HTML 4.01 specification
shows <link> being used to access external stylesheets. Also, from
where does this guideline originate, as it is more specific than WCAG
13.2?

--
Safalra (Stephen Morley)
http://www.safalra.com/hypertext/

推荐答案

曾几何时* Safalra *写道:
Once upon a time *Safalra* wrote:
我总是使用以下行链接到外部样式表:

< link rel =" stylesheet" HREF ="&的style.css QUOT; type =" text / css">

我最近安装了Firefox的HTMLTidy扩展程序,它反对
到该行,说:

访问:[13.2.1.2]:缺少元数据(链接元素)
优先级2
原因:
如果通过link元素指定了元数据,则其值应为
URI。它不应该用于访问样式表。

这对我来说毫无意义 - HTML 4.01规范
显示< link>用于访问外部样式表。此外,本指南源于哪里,因为它比WCAG更具体13.3?
I''ve always linked to external stylesheets using a line like:

<link rel="stylesheet" href="style.css" type="text/css">

I recently installed the HTMLTidy extension for Firefox and it objected
to that line, saying:

"Access: [13.2.1.2]: Metadata missing (link element)
Priority 2
Cause:
If metadata is specified via the link element its value should be a
URI. It should not be used to access style sheets."

This makes no sense to me whatsoever - the HTML 4.01 specification
shows <link> being used to access external stylesheets. Also, from
where does this guideline originate, as it is more specific than WCAG
13.2?




使用HTMLTidy作为验证器从来没有给我看了。


-

/ Arne

我的小部件网站: http://hem.bredband.net/arnel/

顶级海报将被忽略。引用你要回复的部分,并且不要引用签名!



Use of HTMLTidy as a validator has never maked sence to me.

--
/Arne
My "widget" site: http://hem.bredband.net/arnel/
Top posters will be ignored. Quote the part you
are replying to, and don''t quote signatures!


2005年8月19日11:41:02 -0700 ,Safalra, <我们**** @ safalra.com>写道或

引用:
On 19 Aug 2005 11:41:02 -0700, "Safalra" <us****@safalra.com> wrote or
quoted :
< link rel =" stylesheet" HREF ="&的style.css QUOT; type =" text / css">
<link rel="stylesheet" href="style.css" type="text/css">




我刚用HTMLTidy验证了这样的链接;


< link href =" mindprod.css"类型= QUOT;文本/ CSS" rel =" stylesheet">

< meta http-equiv =" Content-Style-Type" content =" text / css">


没有投诉。


我要求它转换为XHML并将其转换为这样:


< link href =" mindprod.css"类型= QUOT;文本/ CSS"的rel ="样式表" />

< meta http-equiv =" Content-Style-Type"含量="文本/ CSS" />


再次没有投诉。


不幸的是我不知道我有哪个版本的HTMLTidy。它与HTMLValidator 7捆绑在一起

。它是sourceforge HTMLTidy。



I just validated with HTMLTidy a link like this;

<link href="mindprod.css" type="text/css" rel="stylesheet">
<meta http-equiv="Content-Style-Type" content="text/css">

Without complaint.

I asked it to convert to XHML and it converted it like this:

<link href="mindprod.css" type="text/css" rel="stylesheet" />
<meta http-equiv="Content-Style-Type" content="text/css" />

again without complaint.

Unfortunately I don''t know which version of HTMLTidy I have. It came
bundled with HTMLValidator 7. It is the sourceforge HTMLTidy.


开始报价

来自Safalra< us **** @ safalra.com>

in message< 11 ********************** @ z14g2000cwz.googlegroups .com>
begin quotation
from Safalra <us****@safalra.com>
in message <11**********************@z14g2000cwz.googlegroups .com>
我最近安装了Firefox的HTMLTidy扩展程序,它反对
到该行,说:
I recently installed the HTMLTidy extension for Firefox and it objected
to that line, saying:




HTML Tidy不是验证器。尝试使用它作为一个将产生

至少不满意的结果。


-

___ _ _____ | * |

/ __ | | / / _ \ | * | Shawn K. Quinn

\__ \''< (_)| | * | sk*****@speakeasy.net

| ___ / _ | \_\\ \\ ___ \\\\ | * |美国德克萨斯州休斯顿



HTML Tidy is not a validator. Attempting to use it as one will produce
less than satisfactory results, at best.

--
___ _ _____ |*|
/ __| |/ / _ \ |*| Shawn K. Quinn
\__ \ '' < (_) | |*| sk*****@speakeasy.net
|___/_|\_\__\_\ |*| Houston, TX, USA


这篇关于链接到外部样式表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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