本站推荐
GD 3C标准修改笔记
文章介绍
分为二个部骤:HTML 标准化,CSS标准化
HTML部分:
1.结束符">"替换为" />"
2.字体色类“font color="#008800"”才是正确的,原先“font color=#008800”并不标准。
反映在:分类名称
解决:后台“基本设置”中修改默认值。
3.关于"&"修改为"&"(AMP小写)在URL中,参考信息:
Another common error occurs when including a URL which contains an ampersand ("&"):
<!-- This is invalid! --> <a href="foo.cgi?chapter=1
This example generates an error for "unknown entity section
To avoid problems with both validators and browsers, always use &
<a href="foo.cgi?chapter=1
Note that replacing &
4.MARGINHEIGHT=3
Those attributes are either no longer supported, or are browser and/or program specific. Those attributes can be achieved by using CSS. For example, the margin attributes can be replaced with CSS...
body {
top:0;
left:0;
margin:0;
padding:0;
}
The other errors are also handled the same way. You will need to assign classes to those elements and then utilize CSS to style them.
官方参考:
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).
This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.
How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.
BY LUO:这涉及到IFRAME的W3C标准化问题,可以用JS或CSS解决,我是用JS实现的:以下为前后代码:
-------------------原来----------------
<p>公告板:<iframe name=announcement marginheight=3 marginwidth=0 frameborder=0 border=0 vspace=0 width=87% noresize height=16 scrolling=no src="{$InstallDir}gg/announcement.html"></iframe></p>
-------------------更改----------------
直接用"IFRAME"不符合"W3C网页标准",JS实现iframe 标准化.
一、建立一个JS文件,代码如下:
function announcement(url,mh,mw,w,h){document.write('<iframe id="announcement" name="announcement" marginheight="'+mh+' marginwidth="'+mw+' width="'+w+'" height="'+h+'" border="0" vspace=0 frameborder="0" scrolling="no" src="'+url+'"></iframe>');}
保存成"announcement.js" ,上传到指定目录
二、在网页中插入代码到HEAD中
<script type="text/javascript" src="/gg/announcement.js"></script>
三、在原先地方用下面代码替换,即:
:<iframe name=announcement marginheight=3 marginwidth=0 frameborder=0 border=0 vspace=0 width=87% noresize height=16 scrolling=no src="{$InstallDir}gg/announcement.html"></iframe>
替换为:
<script type="text/javascript">announcement('http://www.greendd.com/gg/announcement.html','3','0','87%','16');</script>
函数announcement()使用说明:announcement('URL地址','MH','MW','W','H',)
5.出错:
<SCRIPT src="
出错:
element "SCRIPT" undefined.
script大写请改为小写,标明type="text/javascript"
6.document type does not allow element "a" here; assuming missing "li" start-tag.
.html" title="最新火影忍者,海贼王等高清动画下载">
查找:classmenu.asp中
strContent = strContent & "<br>"
替换为
strContent = strContent & "
"
8.there is no attribute "onSubmit".
onSubmit="
解答:字母小写!
Try using the attribute onsubmit versus onSubmit (no
文章上下页关联
相关文章欣赏