IIS Incorrect on Invalid Markup RRS feed

  • Question

  • User1897513591 posted

    On my website, the page starts out with the following:

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


          <title>School-DashBoard Home</title><meta name="Keywords" content="School, Dashboard, School Dashboard, School-DashBoard" /><meta name="Description" content="This is the School Dashboard site." />

          <link href="http://cdn1.officelivecontent.com/2.02.2407.0/WebHosting/_layouts/1033/wh/stylesV2/masterroot.css" mce_href="http://cdn1.officelivecontent.com/2.02.2407.0/WebHosting/_layouts/1033/wh/stylesV2/masterroot.css" type="text/css" rel="stylesheet" />

           <link href="http://cdn1.officelivecontent.com/2.02.2407.0/WebHosting/_layouts/1033/wh/stylesV2/tables.css" mce_href="http://cdn1.officelivecontent.com/2.02.2407.0/WebHosting/_layouts/1033/wh/stylesV2/tables.css" type="text/css" rel="stylesheet" />

          <link type="text/css" rel="stylesheet" href="/theme.css" mce_href="/theme.css" />

          <style type="text/css"> </style>


    <body> ...

    SEO Toolkit reports: "The page contains invalid markup.
    The Tag 'style' was not closed correctly, the Tag 'head' was closed instead.

    It looks like to me that the style tag is open and closed correctly, and so is the head tag.

    So why does SEO Toolkit report this a invalid markup ?

    Are the remainder of the SEO Toolkit detections just as inaccurate?

    Monday, December 21, 2009 10:23 AM

All replies

  • User-972343261 posted
    It's possible that the toolkit is doing validation using regular expressions. So, in your html you have an open and closed Style tag, but without any content. So, because of that it's possible that the regular expression fails to find < style >[something]</ style > and therefore reports that it's not properly closed... Anyway, that's just an idea. It would be interesting if you put something between the tags to see if it still reports it being wrong? Iulian
    Monday, December 21, 2009 10:45 AM
  • User1897513591 posted

    These are fairly basic HTML markup rules. That a tag may be open and closed by either <tag> </tag> or <tag.../> and that a tag may contain attributes without any content inside.

    I expect the IIS SEO Toolkit should be smart enough to recognize this as correct HTML markup.

    Not a very good tool if it can not properly recognize basic HTML syntax.

    Monday, December 21, 2009 10:53 AM
  • User-47214744 posted

    Thanks,  we do have a bug in parsing empty syle tags, we have fixed that and will be releasing an update in the upcoming weeks.

    For now this should be safe to ignore, and once we release the fix you will no longer get this problem.


    Friday, January 8, 2010 3:08 PM
  • User-47214744 posted

    We have a version now of the IIS SEO Toolkit that includes the fix for this problem, so please install the latest version and you should stop seeing this problem.


    Monday, February 1, 2010 2:57 AM
  • User-1452109181 posted

    I hope this is the best place to post this, the forum topic seemed to be the closest match to my problem. If it is not then please accept my appoligies.


    I have a similar problem with the IIS SEO Toolkit - When I run a report on a product page of my site, I get a violation :

    The page contains invalid markup.

    The page at "http://..." contains invalid markup.
    The Tag 'tr' was not closed correctly, the Tag 'table' was closed instead.

    If I validate the same page at http://validator.w3.org/ then it reports that the page has passed.

    Is the IIS wrong or is it the w3 validator?

    If anybody has any ideas then please do let me know.

    Monday, March 22, 2010 11:23 AM
  • User-47214744 posted

    That is very interesting to see the validator pass your markup since it does seem to have the problem mentioned in the toolkit, note that the last <tr> is never closed and instead </table> is closed. I would expect this to be raised by the validator but somehow they are ok with it.

    <table border="0" width="100%" cellspacing="0" cellpadding="0">
    <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
    <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td>
    <td align="center"><h1>...</h1></td>
    <tr>   <td align="center" class="main"><form name="filter">...</form></td>
    Thursday, March 25, 2010 10:34 AM
  • User-1452109181 posted

    I guess that I messed up on that bit of code. I shall try and find the offending tag/ tags and close them properly, re-run the report until I get rid of the violation mentioned in the toolkit. I will then try the page again through the validator.

    It does seem strange that the validator would pass the code with such an error.

    Thanks Carlos

    Thursday, March 25, 2010 10:59 AM
  • User-47214744 posted

    One tip is that when you open that violation details (double click it), you can see where the problem in the markup exists by going to the "Content" tag. It should highlight the begining of the markup that cause the violation, that way you should know exactly where the problem was found.

    Thursday, March 25, 2010 11:43 AM
  • User-1452109181 posted

    Just a quick update - Sorry it has been so long, I was side-tracked by a couple of other projects.

    Using the content tab did help highlight the problem areas - Thanks for that Carlos. It took quite a bit of juggling about with <table>, <tr>, <td> tags to get my pages validating with IIS and W3Validator. The main problem was that my pages had been quite heavily modified, with custom modules installed and some others removed so there were some extra tags still floating about where they shouldnt have been.

       It was well worth the effort though as I now have my pages looking the way I want them in both Internet Explorer and Firefox and they validate in both IIS and W3.

    Thursday, May 6, 2010 6:42 AM
  • User-47214744 posted

    By the way I just posted a blog on how to extend the SEO Toolkit to call the W3 Validator automatically:



    Monday, May 10, 2010 5:55 PM