本文介绍了WC3验证XHTML与样式错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以帮忙吗?我有一个搜索框,引用一个子域,在它的表面上搜索框和结果显示正常。但是,当我执行web url的wc3验证时,它会出现6个错误,我正在尝试生成一个0错误的网站。任何得到很好的建议。

我使用的脚本是:
< div id =" page_content">
<! - #BeginEditable" PAGECONTENT" ; - >
< style>
.eolts_quick .eolts_label_show {width:0px;}
.eolts_quick select {width:125px;}
.eolts_more {color:#fff ;背景:橙色; border:1px solid #fff; padding = 5px;}
.eolts_more a {text-decoration:none;}
< / style>
< div style =" background:#D3E1EE; padding-bottom:10px ; width:142px;">
< div style =" margin:0 0 5px 10px; font-family:Arial; color:#3B88BD; font-size:24px; font-weight:bold; "> Find Me ...< / div>
< script src =" http://bluewidgets.com/encore_search.php?fixed=1&hidelabels=1"></script >
< / DIV>
<! - #EndEditable - >

我列出的WC3验证错误是:

< style >

上面给出的属性是您使用过的元素所必需的,但您已将其省略。例如,在大多数HTML和XHTML文档类型中,"类型"是指"类型"。属性在"脚本"上是必需的。元素和"alt"属性是"img"所必需的。元素。


  1. 第194行,第9列文档类型不允许元素"style"这里

  2. < style >



  3. 上面提到的元素是在不允许的上下文中找到的。这可能意味着您有错误的嵌套元素 - 例如"样式"和"样式"。 "身体"中的元素部分而不是内部"头部" - 或两个重叠的元素(不允许)。

    解决方案

    Can anyone help? I have a search box that refers to a sub-domain and on the face of it the search box and results display fine. However, when I carry out a wc3 validation of the web url it comes up with 6 errors and I am trying to produce a website with 0 errors. any advice greatfully received.

    The script that I am using is:
    <div id="page_content">
     <!-- #BeginEditable "PAGECONTENT" -->
      <style>
    .eolts_quick .eolts_label_show{width:0px;}
    .eolts_quick select{width:125px;}
    .eolts_more{color:#fff; background:orange; border:1px solid #fff; padding=5px;}
    .eolts_more a {text-decoration:none;}
    </style>
    <div style="background:#D3E1EE;padding-bottom:10px;width:142px;">
    <div style="margin:0 0 5px 10px;font-family:Arial;color:#3B88BD;font-size:24px;font-weight:bold;">Find Me ...</div>
    <script src="http://bluewidgets.com/encore_search.php?fixed=1&hidelabels=1"></script>
    </div>
    <!-- #EndEditable -->

    The WC3 validation errors that I have listed are:

    <style>

    The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.

    1. Line 194, Column 9: document type does not allow element "style" here
    2. <style>
    3. The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

      解决方案


      这篇关于WC3验证XHTML与样式错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 22:13