-1

i am using this in HTML5

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

But w3c validator giving me this error:-

Element link is missing required attribute property.

Please help i am stucked with it,

My Code is:

<!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>

Everything is according to standards. Please have a look on the code. I don't know why validator is not passing my page.

astorije
  • 2,666
  • 2
  • 27
  • 39
Cool Sporty
  • 311
  • 1
  • 6
  • 18
  • Is your `` inside the ``? If yes, place it in the `` at the top of the document – Linga Jan 31 '14 at 06:51
  • possible duplicate of [Element link is missing required attribute property](http://stackoverflow.com/questions/18549726/element-link-is-missing-required-attribute-property) – azeós Jan 31 '14 at 06:54
  • its in head section, i am editing the question please have a look again – Cool Sporty Jan 31 '14 at 06:59
  • 1
    The problem is the same as your last question. You have invisible characters starting the `body` element earlier then you expect and the rules for what attributes are allowed on a link/meta element differ depending on if it is in the head or the body. Duplicate of [Attribute name not allowed on element meta at this point](http://stackoverflow.com/questions/21464106/attribute-name-not-allowed-on-element-meta-at-this-point) – Quentin Jan 31 '14 at 07:27
  • @Quentin is right, I written the meta tags by hand and everything is working. The `"description"` one has a problem, I don't know about the others. – azeós Jan 31 '14 at 07:33

2 Answers2

0

you can add property="stylesheet" in the link tag

Shahzad Barkati
  • 2,532
  • 6
  • 25
  • 33
krishdev
  • 3
  • 2
-2

link tags don't need self closes. Remove that and try again.

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

0GiS0
  • 17
  • 2
  • The question says it is HTML 5, so it is perfectly acceptable (albeit pointless) to put a `/` at the end of a link tag. – Quentin Jan 31 '14 at 07:29
  • If you check HTML 5 Specification about that, You can see link tags have no self closed mode http://www.w3.org/TR/html5/document-metadata.html#the-link-element – 0GiS0 Jan 31 '14 at 08:04
  • I don't know why you think it should say "self closed mode", it is defined as having an empty content model. If you want to see how the `/` should be handled, then look at [the parsing rules](http://www.w3.org/TR/html5/syntax.html#parsing-main-inhead): Link elements "Acknowledge the token's self-closing flag" (which is added by having a `/` and causes a parse error to be thrown if it is **not** acknowledged). – Quentin Jan 31 '14 at 08:48
  • As @Quentin says, both `` and `` are valid HTML5 markup. – astorije Feb 06 '14 at 19:22