Skip navigation
Currently Being Moderated

Validator Errors and the Fix

Mar 12, 2013 8:15 AM

Hello

 

I need to understand the mistakes, apply the corrections.

 

I want to offer a basic page ( http://www.meherbabalibrary.com/babalist/list_g/list_g.html)  and ask for assistance. It is without CSS, with Divs - a basic unpopulated page with navigation bar.

 

I ran this page through www.validator.w3g.com and validator found 18 errors.

 

To have explained a few mistakes that will give me an understanding. I need to understand the dynamics that are involved in correcting the mistakes so that I can apply the corrections on this page and other pages that have been created.

 

For example I have a series of errors on line 111:

 

<body leftmargin="5" topmargin="5" marginwidth="5" marginheight="5" onLoad="MM_preloadImages('../../buttons/bhr.gif','../../buttons/kkr.g if','../../buttons /dvdr.gif','../../buttons/cjr.gif','../../buttons/avr.gif','../../but tons/bsr.gif','../../images/shack/0_Shack_MBBks.jpg')">

<div id="pageContainer">

 

I see the validator has highlighted in red most of the quotes  - and if I remove all quotes in red and then view the page in web browser most of line 111 is transformed into text. That experiment did not work.

 

However if I run validator as Group Error Message by Type those reds quote show  "there is no attribute X". I don’t understand this.

 

 

On line 115 is another series of errors and again the ' " ' symbols are highlighted in red.

 

<a href="../../index.htm" target="_top" onClick="MM_nbGroup('down','group1','bhb','',1)" onMouseOver="MM_nbGroup('over','bhb','../../buttons/bhr.gif','',1)" onMouseOut="MM_nbGroup('out')"><img src="../../buttons/bhb.gif" alt="" name="bhb" width="120" height="41" border="0" onload=""></a>Th

 

I Googled the errors. I am unable to understand the errors and the appropriate method to fix the errors.

there is no attribute "onClick"
there is no attribute "onMouseOver"
there is no attribute "onMouseOut"
there is no attribute "onload"
end tag for "img" omitted, but OMITTAG NO was specified

Thanks for indulging this long query. To wrap up I see in a few lines the "You may have neglected to close an element" supported with 'end tag for "img" omitted, but OMITTAG NO was specified'.

Again I ran validator as ‘Group Error Message by Type’ the end tag for X omitted, but OMITTAG NO was specified".  I hope this question isn’t too long as I really need to learn how to apply fix it routines after running the validator. 

Thanks

 

 
Replies
  • Currently Being Moderated
    Mar 12, 2013 8:54 AM   in reply to Timber%%

    Quote marks need to alternate as they are nested. If you have something like...

     

    attribute="value("subvalue");"

     

    It needs to be changed to...

     

    attribute="value('subvalue');"

     

    Alternating from double " to single ' for each nested pair.

     

    EDIT: Also, all values in a group need to be quoted, you can't have ('value','value2',value3) It has to be ('value','value2','value3')

     

     

     

    With your current Doctype declaration, certain attributes need to be written differently...

     

    onClick, onLoad, onMouseOver and onMouseOut all need to be lowercase only, no caps

     

    OMMITTAG NO is from using a > to close a tag instead of /> (the slash is important)

     

    This line of code...

     

    leftmargin="5" topmargin="5" marginwidth="5" marginheight="5"

     

    Should be removed and replaced in the css with this...

     

    body {

         margin-top:5px;

         margin-left:5px;

    }

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 12, 2013 3:39 PM   in reply to Timber%%

    You could eliminate many of your errors and code bloat if switched from image based menus to CSS styled text links. 

     

    Below is a quick example (no images required).  Copy & paste this code into a new, blank page.

     

     

    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>HTML5 Document</title>
    
    <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    
    <style>
    body {
    width: 720px;
    margin: 0 auto;
    }
    
    nav {
    width: 720px;
    margin:0 auto;
    overflow: hidden; /*to control floats*/
    }
    
    nav ul { margin: 0; padding:0 }
    
    nav li {
    margin: 0;
    padding: 0;
    list-style: none;
    float: left;
    font-size: 14px;
    font-variant: small-caps;
    font-weight:bold;
    }
    
    nav li a {
    margin: 0;
    display: block;
    text-decoration: none;
    color: #000;
    width: 120px;
    line-height: 2em;
    text-align: center;
    /**gradients for various browsers**/
    background: rgb(232,240,175); /* Old browsers */
    background: -moz-linear-gradient(left, rgba(232,240,175,1) 0%, rgba(232,240,175,1) 0%, rgba(162,218,178,1) 53%, rgba(150,218,209,1) 98%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(232,240,175,1)), color-stop(0%, rgba(232,240,175,1)), color-stop(53%, rgba(162,218,178,1)), color-stop(98%, rgba(150,218,209,1))); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(left, rgba(232,240,175,1) 0%, rgba(232,240,175,1) 0%, rgba(162,218,178,1) 53%, rgba(150,218,209,1) 98%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(left, rgba(232,240,175,1) 0%, rgba(232,240,175,1) 0%, rgba(162,218,178,1) 53%, rgba(150,218,209,1) 98%); /* Opera 11.10+ */
    background: -ms-linear-gradient(left, rgba(232,240,175,1) 0%, rgba(232,240,175,1) 0%, rgba(162,218,178,1) 53%, rgba(150,218,209,1) 98%); /* IE10+ */
    background: linear-gradient(to right, rgba(232,240,175,1) 0%, rgba(232,240,175,1) 0%, rgba(162,218,178,1) 53%, rgba(150,218,209,1) 98%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e8f0af', endColorstr='#96dad1', GradientType=1 ); /* IE6-9 */
    Color format: Comments IE9 Supp
    }
    
    nav li a:hover, nav li a:active, nav li a:focus {
    text-decoration: underline;
    background: #E8F0AF;
    filter:none;
    }
    
    /**clear floats after nav**/
    nav:after {
    clear: left;
    display: block;
    }
    </style>
    </head>
    
    <body>
    <header><img src="http://www.meherbabalibrary.com/logos/Logo10.png" alt="logo" height="128" width="720"> </header>
    <nav>
    <ul>
    <li><a href="#">Baba's Home</a></li>
    <li><a href="#">Kalki's Kitchen</a></li>
    <li><a href="#">DVD Selection</a></li>
    <li><a href="#">Curator's Jive</a></li>
    <li><a href="#">Advent Vault</a></li>
    <li><a href="#">Baba Splash</a></li>
    </ul>
    </nav>
    
    <h2>CSS Menu without images</h2>
    <p>Simple to edit, no complex scripts or image swap behaviors, less code, easily indexed by search engines, translators and screen readers. </p>
    </body>
    </html>
     
    |
    Mark as:
  • Currently Being Moderated
    Mar 23, 2013 11:34 AM   in reply to Timber%%

    #1 Your server is cAsE sEnSiTiVe.  In other words, this url

    http://www.meherbabalibrary.com/Kalki.htm  (upper case K)

     

    is not the same as at this url

    http://www.meherbabalibrary.com/kalki.htm (lower case k)

     


    #2 Kalki.htm is 404 not found on server.  It won't appear in any browser.

     

    #3 you have some code errors in kalki.htm that need attention:

    http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.meherbaba library.com%2Fkalki.htm

     

     

     

    Nancy O.


     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points