SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Zealot
    Join Date
    Dec 2010
    Posts
    145
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with markup validation errors

    Hey guys,

    First of all I'd like to apologize for the length of the post. It's mostly just copy/pasted errors... Just trying to follow some best practices and make sure that my site is compliant. Coming up with 6 errors and I'm not really sure how to fix them... If someone can point me in the right direction.

    My site is wordpress. I'm very familiar navigating all of the source files, but I just don't know that much about code (e.g. I don't know when a <noscript> is allowed etc). So far I've just tried puttering around, adding a random div or closing tag but no results...

    Site:

    http://yourvancouvermortgagebroker.ca/

    Errors (using http://validator.w3.org):

    1. Line 482, Column 19: document type does not allow element "noscript" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
    </script><noscript>

    --------

    2. Line 485, Column 7: end tag for "p" omitted, but OMITTAG NO was specified
    </body>

    You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

    Line 201, Column 1: start tag was here
    <p><!-- Google Code for Phone Call (mobile) Conversion Page In your html page,

    -----------

    3. Line 485, Column 7: end tag for "div" omitted, but OMITTAG NO was specified
    </body>

    You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

    Line 183, Column 8: start tag was here
    <div class="entry clearfix homepage">

    ------------

    4. Line 485, Column 7: end tag for "div" omitted, but OMITTAG NO was specified
    </body>

    You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

    Line 182, Column 3: start tag was here
    <div id="content-area">

    ----

    5. Line 485, Column 7: end tag for "div" omitted, but OMITTAG NO was specified
    </body>

    You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

    Line 181, Column 2: start tag was here
    <div id="content" class="clearfix">

    ----

    6. Line 485, Column 7: end tag for "div" omitted, but OMITTAG NO was specified
    </body>

    You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

    Line 68, Column 2: start tag was here
    <div id="page-wrap">

    ----


    Any guidance appreciated... thanks

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,870
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    1. The noscript tag is as obsolete as Netscape 4. It is far simpler with more modern browsers to simply hide the content that used to go in the noscript tag from JavaScript. If you must use a noscript tag then it is a block level tag and so must be wrapped around complete paragraphs of text. If you need to hide inline text when JavaScript is available then you must use JavaScript to do it. See http://javascriptexample.net/basics02.php for an example (that page contains two examples - the second is the JavaScript equivalent of the non-existant <noajax> tag).

    2. through 6. are all complaining about missing end tags - either you have left out the end tags or have nested them incorrectly or the incorrect placement of the noscript tag has caused those errors.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #3
    SitePoint Zealot
    Join Date
    Dec 2010
    Posts
    145
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just copy/pasted the code directly from Google Adwords - it's the remarketing tag they provide you with.

  4. #4
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,870
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by awkward_clam View Post
    I just copy/pasted the code directly from Google Adwords - it's the remarketing tag they provide you with.
    If you remove that code from your page (temporarily) does it still give errors?
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  5. #5
    SitePoint Zealot
    Join Date
    Dec 2010
    Posts
    145
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall View Post
    If you remove that code from your page (temporarily) does it still give errors?
    If I remove that one specific remarketing tag, then it removes one of the six errors.

  6. #6
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,870
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by awkward_clam View Post
    If I remove that one specific remarketing tag, then it removes one of the six errors.
    So the other errors are not related to that tag - all of them are basically saying that you have opened a tag and that the corresponding closing tag cannot be found so to fix them you need to add the missing closing tags.

    Wrapping a <noscript> inside a <div> should fix the validation of that.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •