打印

关于标准验证的几个问题?

今天验证了一下我的网页,有N个错误,有的错误很奇怪,不知道原因,请高手帮一下。

1。

Line 23, column 6: end tag for "head" which is not finished
</head>

Most likely, You nested tags and closed them in the wrong order. For example <p><em>...</p> is not acceptable, as <em> must be closed before <p>. Acceptable nesting is: <p><em>...</em></p>

Another possibility is that you used an element (e.g. 'ul') which requires a child element (e.g. 'li') that you did not include. Hence the parent element is "not finished", not complete.

但我的<head></head>封闭了啊?

No.2

2。
Line 26, column 17: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified

<script language= j avaScript type="text/javascript">ShowHeaderMainNew()</script>

这个是因为什么?小弟不知?

No.3

3.

Line 27, column 55: there is no attribute "for"

<script language=javascript type="text/javascript" for=window event=onload>

这个怎么修改啊?
先说这几个出现次数最多的错误,期待高手解惑?

TOP

还在为头像烦恼?还在为不能关注好友动态烦忧?快来蓝色理想家园吧!
1.嵌套标签次序可能有错.
2.3.<script type="text/javascript"></script>要写成这样,才能通过.


I follow W3C Web Content Accessibility Guidelines.
Fifty Studio  

TOP

昨天没有时间,今天我把源代码贴出来(做了一些简化。请高手们帮

<?xml version="1.0" encoding="gb2312"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="gb2312">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="Content-Language" content="gb2312" />
<meta content="all" name="robots" />
<link rel="stylesheet" rev="stylesheet" href="css/style.css" type="text/css" media="all" />
<script src="js/menu.js" type="text/javascript"></script>
</head>

<body>
<script language=javaScript type="text/javascript">ShowHeaderMainNew()</script>
<script language=javascript type="text/javascript" for=window event=onload>
initAd();//after load, run initAd()
startglowing();
</script>
<!--top of the page-->
<div id="header">
<a href="http://***.***.***">Home</a> |
<a href="mailto:***@***.***.***.***">Contact</a> |
<a href="#" onClick="window.external.addFavorite('http://***.***.***/','***')">Favorites</a>
<script language="JavaScript" type="text/javascript" src="js/choose_language.js"></script>
</div>
<!--menu-->
<div id="menu"><img src="***" /></a></div>
<!--middle of the page-->
<div id="middle">
<div id="middlebackground">
<div id="right">
<div class="text"><b>123</b><marquee behavior=auto scrollamount=1 scrolldelay=90 direction=up height=195>***</marquee></div>
</div>
<div id="left">
<div class="text">***</div>
</div>
</div>
</div>
<!--foot of the page-->
<div id="footer">
<div id="footerbg"><div id="copyright">Copyrights 2005</div>
</div>
</div>
<script language=javaScript type="text/javascript" src="js/motion.js"></script>
<div id=AdLayer style="FILTER: revealTrans(transition=23,duration=0.5) blendTrans(duration=0.5); left: 780px; position: absolute; top: 0px; width: 222px; background: url(pic/p.jpg) no-repeat top; z-index: 20">
<a href="javascript:void(Hide(AdLayer))"><img src="close.gif" alt="" /></a>
<div class="text-r" style="margin: 19px 0px 0px 0px">
<div style="margin-left:3px">
<img src="images/notice.gif" width="219" alt="notice" />***</div>
</div>
</body>

</html>

TOP

昨天没有时间,今天我把源代码贴出来(上面,做了一些简化)。请高手们帮忙看一下。

TOP

修改几个地方:
1.language=javaScript ,属性值要加引号,写成language=“javaScript ”;
2.<script>标签没有for=window event=onload这两个属性,不能这样写;
3.onClick要写成onclick,所有标签要小写;
4.图片要加alt属性,<img src="***" />要写成<img src="***" alt="***" />
5.同一行<div id="menu"><img src="***" alt="" /></a></div>缺少"<a>"标签;
6.<marquee>是IE私有标签,不能使用,可以采用js来替代实现类似效果;
7.id=AdLayer写成id="AdLayer";
8.同一行<div id=AdLayer>没有结束"</div>"标签;
9.关于<head>提示出错,是要求你在head区必须有<title>标签
学无止境 笑口常开 http://www.w3cn.org

TOP