HTML验证问题

时间:2013-11-14 01:34:26

标签: html validation header w3c-validation

我在客户的网站上执行了W3C HTML验证,并且说我过早关闭了标头标签。这会产生错误,说明我已将元标记和链接标记放在标题之外。

有人可以告诉我的标题有什么问题吗?

警告:成人网站NSFW

确认: http://validator.w3.org/check?uri=http%3A%2F%2Fwww.hush-hush.com%2F1stflick%2F&charset=%28detect+automatically%29&doctype=Inline&group=0&ss=1

<!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" xml:lang="en" lang="en">
<head>
    <title>Nude Teen Videos | 1st Flick - Week 624</title>

    <script type="text/javascript">
        var _gaq = _gaq || [];
        _gaq.push(['_setAccount', 'UA-22415623-1']);
        _gaq.push(['_trackPageview']);
        (function() {var ga = document.createElement('script');
        ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0];
        s.parentNode.insertBefore(ga, s);
        })();
    </script>

    <meta name="google-translate-customization" content="c6d5b23c329fcd9b-06d3de73510dc63e-g0ea7962122bd05dd-11"></meta>

    <!-- Start Alexa Certify Javascript -->
        <script type="text/javascript">_atrk_opts = { atrk_acct:"9AYbi1acVE0008", domain:"hush-hush.com",dynamic: true};
            (function() { var as = document.createElement('script');
            as.type = 'text/javascript';
            as.async = true;
            as.src = "https://d31qbv1cthcecs.cloudfront.net/atrk.js";
            var s = document.getElementsByTagName('script')[0];
            s.parentNode.insertBefore(as, s);
            })();
        </script>
        <noscript>
            <img src="https://d5nxst8fruw4z.cloudfront.net/atrk.gif?account=9AYbi1acVE0008" style="display:none" height="1" width="1" alt="" />
        </noscript>
    <!-- End Alexa Certify Javascript -->

    <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
    <link rel="stylesheet" href="/css/screen.css" type="text/css" />
    <!--[if IE 6]>
        <link rel="stylesheet" type="text/css" href="/css/ie6.css" media="screen"/>
        <script defer type="text/javascript" src="/js/pngfix.js"></script>
    <![endif]-->
    <!--[if IE 7]>
        <link rel="stylesheet" type="text/css" href="/css/ie7.css" media="screen"/>
    <![endif]-->

    <script type="text/javascript" src="/js/script.js"></script>

    <link rel="alternate" title="Hush-Hush Galleries: News &amp; Updates" href="http://www.hush-hush.com/feed.xml" type="application/rss+xml" />
    <meta name="Description" content="1st Flick amateur teen video download. Submit vid to win password or cash."></meta>
    <meta name="KEYWORDS" content="movies, movie, video, videos, softcore, 1st Flick, teen, download, password, bedroom, amateur, adult, voyeur, downblouse, nipple, nipple slip, nip slip, upskirt, hidden camera, topless, celebrity nude"></meta>
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" ></script>
</head>
<body>
...

3 个答案:

答案 0 :(得分:2)

<noscript>元素不允许作为<head>元素的子元素。它们只能出现在<body>个元素中。

答案 1 :(得分:1)

HTML 4.01 (或 XHTML 1.0 )中,noscript element不得使用head element

HTML5 中,它将是allowed

  

noscript元素
  [...]
  可以使用此元素的上下文:
  在HTML文档的head元素中,如果没有祖先noscript元素。

但请注意,如果在head中使用,则不得包含除linkstylemeta之外的任何其他元素。所以你cannot use the ìmg element as child

XHTML5 中,不允许这样做。


  

<noscript>标签会过早关闭标题吗?

可能。如果解析器找到noscript元素,则假定body必须已启动。但当然可能可能一切按预期工作(除非无效)。

我认为使用noscript中的body可以正常工作。

答案 2 :(得分:1)

为什么不把<noscript>移到身体里?