2个错误 - HTML 4.01过渡验证 [英] 2 errors - HTML 4.01 Transitional validation

查看:117
本文介绍了2个错误 - HTML 4.01过渡验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经将我的错误从12减少到2,但是它显示了2我不能

真的可以做任何事情。


1第126行,第48列:没有属性COLOR


< td height =" 1" colspan =" 5"< hr size =" 1" color ="#CCCCCC">< / td>

2.第286行,第27列:没有属性BACKGROUND


< td width =" 4" background =" right-bittorrent-bg.gif">& nbsp;< / td>


对于第一个如果我删除颜色属性显然会改变颜色

这不是我想要的。

对于第二个我不太确定。


Dreamweaver MX建议当你输入时,它的COLOR和BACKGROUND属性都是自动弹出的东西,所以DW是错误的还是

验证器是错误的。我错误地得到了这些错误?


在顶部我有:

<!DOCTYPE HTML PUBLIC" - // W3C // DTD HTML 4.01 Transitional // EN">

< meta http-equiv =" Content-Type"含量=" text / html的; charset = iso-8859-1">

I have wittled down my errors from 12 to 2, but the 2 it shows i can''t
really do anything about.

1. Line 126, column 48: there is no attribute "COLOR"

<td height="1" colspan="5"><hr size="1" color="#CCCCCC"></td>
2. Line 286, column 27: there is no attribute "BACKGROUND"

<td width="4" background="right-bittorrent-bg.gif">&nbsp;</td>

For the first if I delete the color attribute obviously it changes colour
which isn''t what i want.
For the second i''m not really sure about.

Dreamweaver MX suggests both the COLOR and BACKGROUND attributes on it''s
auto pop-up thing while you''re typing, so either DW is wrong or the
validator is wrong. What am I doing wrong to get these errors?

At the top i have:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

推荐答案

" StardogChampion" < ST ************* @ blueyonder.co.uk>在消息中写道

新闻:W0 ********************* @ news-text.cableinet.net ...
"StardogChampion" <st*************@blueyonder.co.uk> wrote in message
news:W0*********************@news-text.cableinet.net...
我已将我的错误从12减少到2,但是它显示我不能真正做任何事情。


啊,这就是你错的地方。你可以做很多事情。 :)


1.第126行,第48列:没有属性COLOR

< td height =" 1" colspan =" 5"< hr size =" 1"颜色= QUOT;#CCCCCC">< / TD>


这是表现性的,所以你会想用CSS来完成这项工作。你有

重要选项:

1.将样式应用到你的所有< hr>使用#CCCCCC的颜色为1px高的元素。

颜色。在文档的头部(或外部样式

表),添加以下内容:


< style type =" text / css" >

hr {height:1px;颜色:#CCCCCC; }

< / style>


然后替换< hr size =" 1"颜色= QUOT;#CCCCCC">用< hr>。最终结果将是有效的,并且看起来应该像以前一样。


2.将一个类应用于特定的< hr>你希望拥有这些

属性的元素。在文档的头部(或外部样式表),

添加以下内容:


< style type =" text / css" >

..seperator {height:1px;颜色:#CCCCCC; }

< / style>


然后把它放在你的HTML< hr class =" seperator">

(注意,你可以把你想要的任何名字叫做类名,只要HTML中的内容与你的CSS匹配,并假设你遵循CSS命名规则)。 />

3.将ID应用于单个< hr>你希望拥有这些

属性的元素。在文档的头部(或外部样式表),

添加以下内容:


< style type =" text / css" >

#seperator {height:1px;颜色:#CCCCCC; }

< / style>


然后把它放在你的HTML< hr id =" seperator">

(注意,您可以将您想要的任何ID称为,只要HTML中的内容符合您的CSS,并假设您遵循CSS命名规则)。 />

2.第286行,第27栏:没有属性BACKGROUND

< td width =" 4" background =" right-bittorrent-bg.gif">& nbsp;< / td>


再次,表示。从它的外观来看,这个表用于

布局(这是CSS的工作,而不是HTML)。然而,而不是告诉你

你的方式错误...


< style type =" text / css">

#rightbittorrentlayout {background:url(right-bittorrent-bg.gif)no-repeat

左上角; }

< / style>


< td id =" rightbittorrentlayout">& nbsp;< / td>

Dreamweaver MX在你输入时会同时显示COLOR和BACKGROUND属性自动弹出的东西,所以要么DW错误,要么
验证器错误。我错误地得到这些错误?
I have wittled down my errors from 12 to 2, but the 2 it shows i can''t
really do anything about.
Ah, that''s where you''re wrong. There''s plenty you can do about it. :)

1. Line 126, column 48: there is no attribute "COLOR"

<td height="1" colspan="5"><hr size="1" color="#CCCCCC"></td>
This is presentational, so you''ll want to use CSS for this job. You have
severeal options:
1. Apply a style to all of your <hr> elements that make them 1px high with a
color of #CCCCCC. In the head of your document (or in an external style
sheet), add the following:

<style type="text/css">
hr { height: 1px; color: #CCCCCC; }
</style>

Then replace <hr size="1" color="#CCCCCC"> with <hr>. The end result will
be valid, and should look like what you had before.

2. Apply a class to specific <hr> elements that you want to have these
properties. In the head of your document (or in an external style sheet),
add the following:

<style type="text/css">
..seperator { height: 1px; color: #CCCCCC; }
</style>

Then put this in your HTML <hr class="seperator">
(Note, you can call the class name anything you''d like, as long as what''s in
the HTML matches your CSS, and assuming you follow CSS naming rules).

3. Apply an ID to a single <hr> element that you want to have these
properties. In the head of your document (or in an external style sheet),
add the following:

<style type="text/css">
#seperator { height: 1px; color: #CCCCCC; }
</style>

Then put this in your HTML <hr id="seperator">
(Note, you can call the ID name anything you''d like, as long as what''s in
the HTML matches your CSS, and assuming you follow CSS naming rules).

2. Line 286, column 27: there is no attribute "BACKGROUND"

<td width="4" background="right-bittorrent-bg.gif">&nbsp;</td>

Again, presentational. From the looks of it, this table is being used for
layout (which is a job for CSS, not HTML). However, rather than lecture you
on the err of your ways...

<style type="text/css">
#rightbittorrentlayout { background: url(right-bittorrent-bg.gif) no-repeat
top left; }
</style>

<td id="rightbittorrentlayout">&nbsp;</td>

Dreamweaver MX suggests both the COLOR and BACKGROUND attributes on it''s
auto pop-up thing while you''re typing, so either DW is wrong or the
validator is wrong. What am I doing wrong to get these errors?




Dreamweaver错了。


我建议你学习一些CSS。

学习并不困难,而且它是网页演示属性的新标准

页面。该规范可在W3网站上找到( www.w3.org ),我是确定你

如果你搜索谷歌可能会找到一些教程。


问候,

彼得福蒂



Dreamweaver is wrong.

My recommendation to you would be to learn some CSS. It''s not difficult to
learn, and it''s the new standard for presentational properties of a web
page. The spec is available on the W3 website (www.w3.org) and I''m sure you
can probably find some tutorials if you Google search.

Regards,
Peter Foti


StardogChampion写道:
StardogChampion wrote:
我已经将我的错误从12减少到2,但它显示2我不能真的做任何事情。

1.第126行,第48栏:没有属性COLOR

< td height =" 1" colspan =" 5"< hr size =" 1" color =" #CCCCCC">< / td>

2.第286行,第27列:没有属性BACKGROUND

< td width = QUOT; 4英寸背景= QUOT;右的bittorrent-bg.gif">&安培; NBSP;< / TD>


除了验证之外,这些都是演示文稿问题,最好留给

css。如果你将它们放在它们所属的位置,即在外部css

文件中,html可以验证。但看起来你有更多需要担心的重要事项。这些表是否适用于布局?

Dreamweaver MX在您输入时会同时显示COLOR和BACKGROUND属性的自动弹出功能,因此要么DW错误,要么
验证器是错误的。


除非验证器中有错误,并且没有人报告过任何问题,否则验证员只能解释您的工作,

报告html不符合您声称符合的规格。换句话说,Dreamweaver是错误的。

我得到这些错误的错误是什么?


....使用Dreamweaver。 ;-)

在顶部我有:
<!DOCTYPE HTML PUBLIC" - // W3C // DTD HTML 4.01 Transitional // EN">


没有uri?
http://www.w3.org/QA/2002/04/valid-dtd-list.html

< meta http-equiv = QUOT;内容类型"含量=" text / html的; charset = iso-8859-1">
I have wittled down my errors from 12 to 2, but the 2 it shows i can''t
really do anything about.

1. Line 126, column 48: there is no attribute "COLOR"

<td height="1" colspan="5"><hr size="1" color="#CCCCCC"></td>
2. Line 286, column 27: there is no attribute "BACKGROUND"

<td width="4" background="right-bittorrent-bg.gif">&nbsp;</td>
Validation aside, these are presentation issues, and are best left to
css. And if you put them where they belong, i.e., in an external css
file, the html may validate. But it looks like you have more
important things to worry about. Are those tables for layout?
Dreamweaver MX suggests both the COLOR and BACKGROUND attributes on it''s
auto pop-up thing while you''re typing, so either DW is wrong or the
validator is wrong.
Unless there is a bug in the validator, and noone has reported any to
explain what you are seeing, the validator is only doing its job,
reporting that the html does not conform to the spec that you''ve
claimed it conforms to. In other words, Dreamweaver is wrong.
What am I doing wrong to get these errors?
....using Dreamweaver. ;-)
At the top i have:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
No uri?
http://www.w3.org/QA/2002/04/valid-dtd-list.html
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">




声明内容类型的标题应该在

html文件的标题中发出要发送,而不是在html本身。


弄清楚如何发送正确的标题,如果你使用表格来支付
布局,请停止。这些更重要,不仅仅是你的

html验证。


-

Brian

按照我地址中的说明给我发电子邮件



Headers to declare content type should be sent out in the headers of
the html file to be sent, not in the html itself.

Figure out how to send correct headers, and if you''re using tables for
layout, stop. These are far more important, imho, than whether your
html validates.

--
Brian
follow the directions in my address to email me


" Peter Foti" < PE **** @ systolicNOSPAMnetworks.com>在消息中写道

news:vv ************ @ corp.supernews.com ...
"Peter Foti" <pe****@systolicNOSPAMnetworks.com> wrote in message
news:vv************@corp.supernews.com...
" StardogChampion" < ST ************* @ blueyonder.co.uk>在消息中写道
新闻:W0 ********************* @ news-text.cableinet.net ...
"StardogChampion" <st*************@blueyonder.co.uk> wrote in message
news:W0*********************@news-text.cableinet.net...
我已经将我的错误从12减少到2,但是它显示我不能真正做任何事情。
啊,那就是你错了。你可以做很多事情。 :)

I have wittled down my errors from 12 to 2, but the 2 it shows i can''t
really do anything about.
Ah, that''s where you''re wrong. There''s plenty you can do about it. :)

1.第126行,第48列:没有属性COLOR

< td height =" 1" ; colspan =" 5"< hr size =" 1" color ="#CCCCCC">< / td>
1. Line 126, column 48: there is no attribute "COLOR"

<td height="1" colspan="5"><hr size="1" color="#CCCCCC"></td>



这是表现形式,因此您需要使用CSS来完成这项工作。您有严格的选择:
1.将样式应用于所有< hr>使用



This is presentational, so you''ll want to use CSS for this job. You have
severeal options:
1. Apply a style to all of your <hr> elements that make them 1px high with



的元素使它们成为1px高的#CCCCCC颜色。在文档的头部(或外部样式表),添加以下内容:

< style type =" text / css">
hr {身高:1px;颜色:#CCCCCC; }
< / style>

然后替换< hr size =" 1"颜色= QUOT;#CCCCCC">用< hr>。最终结果将是有效的,并且应该看起来像以前一样。

2.将一个类应用于特定的< hr>您希望拥有这些
属性的元素。在文档的头部(或外部样式表)中,
添加以下内容:

< style type =" text / css">
.seperator {身高:1px;颜色:#CCCCCC; }
< / style>

然后把它放在你的HTML< hr class =" seperator">
中(注意,你可以调用类名称) 我想,只要HTML中的
匹配您的CSS,并假设您遵循CSS命名规则。

3.将ID应用于单个<小时>您希望拥有这些
属性的元素。在文档的头部(或外部样式表),
添加以下内容:

< style type =" text / css">
#seperator {身高:1px;颜色:#CCCCCC; }
< / style>

然后把它放在你的HTML< hr id =" seperator">
中(注意,你可以调用你的ID名称) 我想,只要HTML中的内容符合您的CSS,并假设您遵循CSS命名规则。


a color of #CCCCCC. In the head of your document (or in an external style
sheet), add the following:

<style type="text/css">
hr { height: 1px; color: #CCCCCC; }
</style>

Then replace <hr size="1" color="#CCCCCC"> with <hr>. The end result will
be valid, and should look like what you had before.

2. Apply a class to specific <hr> elements that you want to have these
properties. In the head of your document (or in an external style sheet),
add the following:

<style type="text/css">
.seperator { height: 1px; color: #CCCCCC; }
</style>

Then put this in your HTML <hr class="seperator">
(Note, you can call the class name anything you''d like, as long as what''s in the HTML matches your CSS, and assuming you follow CSS naming rules).

3. Apply an ID to a single <hr> element that you want to have these
properties. In the head of your document (or in an external style sheet),
add the following:

<style type="text/css">
#seperator { height: 1px; color: #CCCCCC; }
</style>

Then put this in your HTML <hr id="seperator">
(Note, you can call the ID name anything you''d like, as long as what''s in
the HTML matches your CSS, and assuming you follow CSS naming rules).

2。第286行,第27列:没有属性BACKGROUND
< td width =" 4" background =" right-bittorrent-bg.gif">& nbsp;< / td>

再次,表现。从它的外观来看,这个表用于
布局(这是CSS的工作,而不是HTML)。然而,而不是演讲
2. Line 286, column 27: there is no attribute "BACKGROUND"

<td width="4" background="right-bittorrent-bg.gif">&nbsp;</td>

Again, presentational. From the looks of it, this table is being used for
layout (which is a job for CSS, not HTML). However, rather than lecture



你犯了错误的方式...

< style type =" text / css">
#rightbittorrentlayout {background:url(right-bittorrent-bg.gif)
no-repeat左上角; }
< / style>

< td id =" rightbittorrentlayout">& nbsp;< / td>


you on the err of your ways...

<style type="text/css">
#rightbittorrentlayout { background: url(right-bittorrent-bg.gif) no-repeat top left; }
</style>

<td id="rightbittorrentlayout">&nbsp;</td>


Dreamweaver MX在你输入时会同时显示COLOR和BACKGROUND属性自动弹出的东西,所以要么DW错误,要么
验证器错误。我错误地得到这些错误?
Dreamweaver错了。

我对你的建议是学习一些CSS。学习它并不困难

Dreamweaver MX suggests both the COLOR and BACKGROUND attributes on it''s
auto pop-up thing while you''re typing, so either DW is wrong or the
validator is wrong. What am I doing wrong to get these errors?
Dreamweaver is wrong.

My recommendation to you would be to learn some CSS. It''s not difficult



,它是网页
页面的表现属性的新标准。该规范可在W3网站上找到( www.w3.org ),我是如果你在谷歌搜索,你肯定可以找到一些教程。

问候,
Peter Foti


谢谢你的解释。我已经使用了你的第二步来修复我的水平规则,因为我已经有了一个外部样式表。所以

基本上我需要记住CSS是用于布局和演示,而不是

HTML!

< style type =" text / css">
#rightbittorrentlayout {background:url(right-bittorrent-bg.gif)
no-repeat左上角; }
< / style>

< td id =" rightbittorrentlayout">& nbsp;< / td>


to learn, and it''s the new standard for presentational properties of a web
page. The spec is available on the W3 website (www.w3.org) and I''m sure you can probably find some tutorials if you Google search.

Regards,
Peter Foti

Thank you for your thourough explanations. I have used your second step to
fix my horizontal rules, since i already had an external stylesheet. So
basically i need to remember that CSS is for layout and presentation, not
HTML!
<style type="text/css">
#rightbittorrentlayout { background: url(right-bittorrent-bg.gif) no-repeat top left; }
</style>

<td id="rightbittorrentlayout">&nbsp;</td>




我可以输入.rightbittorrentlayout {background:url(right-bittorrent-bg.gif)

no-repeat左上角; }"在我的样式表中使用< td

class =" rightbittorrentlayout">?我本来可以尝试它而不是

键入另一个问题...再次感谢,我会在CSS上阅读更多内容。



Can i put ".rightbittorrentlayout { background: url(right-bittorrent-bg.gif)
no-repeat top left; }" in my stylesheet and use <td
class="rightbittorrentlayout">? I could''ve tried it already rather than
typing out another question... Thanks again, i''ll read up some more on CSS.

这篇关于2个错误 - HTML 4.01过渡验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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