元素链接缺少必需的属性属性

时间:2014-01-31 06:49:34

标签: html html5 w3c w3c-validation

我在HTML5中使用它

<link rel="stylesheet"  type="text/css" href="css/loader.css"  media="all"/>

但是w3c验证器给了我这个错误: -

Element link is missing required attribute property.

请帮助我坚持下去,

我的代码是:

<!DOCTYPE html>
<html lang="en">
<!--[if IE 7]><html lang="en" class="ie7"><![endif]-->
<!--[if IE 8]><html lang="en" class="ie8"><![endif]-->
<!--[if IE 9]><html lang="en" class="ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><html lang="en"><![endif]-->
<!--[if !IE]><html lang="en"><![endif]-->
<head>
<!-- The title of your site -->
    <title>Directus Media LTD</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <!-- Always make sure to check the robots tag -->
    <meta name="robots" content="index,follow">
    <meta name="description" content="Directus Media specialises in websites for small to medium businesses">​<meta name="keywords" content="southport graphic design, liverpool web design, southport social media management"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
    <script src="js/lib/modernizr.js"></script>

    <!-- Liquid Slider Master -->

    <!-- Essential stylesheets -->
    <link rel="stylesheet"  href="css/loader.css"  media="all"/>
    <link rel="stylesheet"  href="css/lib/essentials.css"/>
    <link rel="stylesheet"  href="css/lib/ytplayer.css"/>
    <link rel="stylesheet"  href="css/lib/font-awesome.min.css"/> 
    <link rel="stylesheet"  href="css/lib/magnific-popup.css"/>
    <link rel="stylesheet"  href="css/lib/jquery.bxslider.css"/>

    <!-- Main stylesheet -->
    <link rel="stylesheet" href="css/style.css" />
    <link rel="stylesheet"  href="css/colors/black.css"/>

    <!-- Favicon -->
    <link rel="shortcut icon" href="images/favicon.ico"/>

    <!--[if lt IE 9]>
        <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
   </head>
<body>

<!-- Preloader -->
<div id="preloader">
    <div id="status">&nbsp;</div>
</div>

一切都符合标准。请查看代码。我不知道为什么验证器没有通过我的页面。

1 个答案:

答案 0 :(得分:-2)

链接标记不需要自行关闭。删除它,然后重试。

http://www.w3schools.com/tags/tag_link.asp