validation help

Discussion in 'HTML & Website Design' started by dj_gie, Jan 30, 2007.

  1. #1
    I have used http://www.totalvalidator.com/validator/Validator

    Could anyone please help make my site fully validated. I don't fully understand how to change these.

    The line numbers displayed below refer to lines in http://www.fcbs.co.uk/index.asp:

    1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    3 E854 [WAI 4.3 (AAA)] Use the 'lang' or 'xml:lang' attribute to denote the primary language of the document:
    <html xmlns="http://www.w3.org/1999/xhtml">
    4 <head>


    9 W604 The 'content' attribute should have a value of 'application/xhtml+xml' for XHTML:
    <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
    10 <meta http-equiv="Content-Language" content="en-GB" />


    33 <form name="jump" id="jump" action="null">
    33 E831 [WAI 12.4 (AA), US-508-n] Associate form controls with <label> tags using the 'id' attribute:
    <select name="menu" class="submit"
    onchange="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;">


    169 W800 [WAI 6.3 (A), US-508-l] Consider providing a <noscript> alternative after each <script> tag:
    <script type="text/javascript">
    179 </script>
    179 <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js">
    180 </script>
    180 <noscript>
    181 <div class="statcounter">
    181 <img class="statcounter"
    src="http://c19.statcounter.com/counter.php?sc_project=2007230&amp;java=0&amp;security=49431c82&amp;in
    visible=1" alt="cool hit counter" />
    181 </div>
    182 </noscript>
    183 </body>
    184 </html>


    Kind Regards
     
    dj_gie, Jan 30, 2007 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    Do this:
    <html xml:lang="en"
          xmlns="http://www.w3.org/1999/xhtml"
          lang="en">
    Code (markup):
    For a new document, there is no sane reason to use a transitional DTD. Use strict.

    Technically true, but what you have is allowed. The W3 sz you "may" use what you have.

    The name attribute is required for some form controls, and is the attribute paired with the value that is sent to the action script. The id attribute should probably be used redundantly for backward compatibility. It is not required.

    That doesn't appear to be an error, but rather, a comment by the validator. In either case, javascript within the document is poor practice. The script should be in an exterior file, and the html document should work perfectly without it. Since the js would be a progressive enhancement, there would be no need for a noscript addition.

    For best results, use the W3 validator. All others are removed from the specification source.

    cheers,

    gary
     
    kk5st, Jan 30, 2007 IP
  3. dj_gie

    dj_gie Peon

    Messages:
    327
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks Gary, much appreciated.
     
    dj_gie, Jan 31, 2007 IP