W3C validation error

Discussion in 'HTML & Website Design' started by intellg, Mar 25, 2013.

  1. #1
    Hi,

    I have website http://tinyurl.com/am3c789

    I have pages with cityname bellevue, bothell, issaquah and so on.

    I am trying to validate my entire website and pages from w3c. But is gives me unrealistic errors such as <head> section, <body> tag not found and such thing.

    Can anybody please suggest me here what is wrong with my website?

    Thanks
     
    intellg, Mar 25, 2013 IP
  2. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #2
    I don't know what you mean by "unrealistic errors" -- to be frank the site design is not viable for web deployment on the accessibility front with the fixed width layout, absurdly undersized fixed metric (px) fonts, fixed image placement that forces said fixed width design, color contrasts right up agains the edge of contrast minimums, and zero images off graceful degradation -- and that's WITHOUT looking at the code.

    With 39 validation errors in a tranny document, which is to say that the code is in transition from 1997 to 1998 coding practices, you do not have HTML, you have gibberish. You have XHTML in a HTML document, your LINK tags are missing the important TYPE and MEDIA attributes. (media is optional, that does not mean it's ok to omit it), none of the ampersands are stored as entities, none of your images have actual ALT text for when images are disabled... and that's just the structural/invalid HTML 'errors'.

    The code itself is garbage with all the scripting for nothing, presentational images in the markup, div and scripting to do the job of anchor tags (meaning for many people the page doesn't let you use it at all), in modern code quotes around values are NOT optional, the heading tag orders (like H3's with no H2 or H1 preceeding them - so what are they a subsection of?!?) are gibberish, the use of H1 paired with H2 is even BIGGER gibberish, the incomplete/inaccessible FORM needs a good deal of work -- and the endless pointless classes slapped on everything for christmas only knows what is a real head scratcher.

    Just another laundry list that to be frank, would be faster to fix by throwing it all away and starting over from scratch than to try and save any of the existing code... and that's just looking at the home page. Some of the subpages are truly terrifyingly bad... to the point it's a miracle they render at ALL in any browser. You've got the typical "but I can do it in Photoshop" not viable for accessible web deployment design mated to sloppy/outdated/invalid non-semantic code... makes little if anything from the site worth even trying to salvage if you care about accessibility. Even if you got it to validate as it sits right now, it would still be garbage.
     
    deathshadow, Mar 25, 2013 IP
  3. creativewebmaster

    creativewebmaster Active Member

    Messages:
    654
    Likes Received:
    7
    Best Answers:
    4
    Trophy Points:
    78
    #3
    most of the error related to ALT tag not found so, give ALT tag where is image. Also proper give end for example <meta />
     
    creativewebmaster, Mar 25, 2013 IP
  4. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #4
    It's H4 tranny, not X1 tranny, so the proper ending would be just a greater than sign without the slash. Slashes are for XHTML.
     
    deathshadow, Mar 25, 2013 IP
  5. intellg

    intellg Well-Known Member

    Messages:
    397
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    130
    #5
    Hi deathshadow,
    Thanks for your response. But why it give me errors like
    </head>
    The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.


    " >
    ✉
    The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

    Let me know why <body>,<html> and <head> common tags show errors.

    Thanks
     
    intellg, Mar 25, 2013 IP
  6. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #6
    The validator is often not accurate if an error occurs at the top -- as it tries to plod along through the file previous errors can cause valid code to appear invalid to it. this is why when debugging validation errors you have to start at the top, fix ONE, and sometimes a dozen others will disappear.

    Case in point, the page currently has 39 validation errors, but if you change this:
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    into this:
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

    It will drop to 32 errors -- all those 'unclosed' and 'not allowed' in HEAD just go away. That slash is a XHTML style close, which has no business in a HTML doctype. (and vice-versa on 'empty' tags -- empty tags in the spec meaning tags that cannot have content, not tags that do not have content).

    the next set of errors is unencoded ampersands in the URL on line 15. Just change this:
    src="http://maps.googleapis.com/maps/api/js?key=AIzaSyCwJNsXGiPm4KJlQScJD-5oMDgNdsRST4k&sensor=true"

    To this:
    src="http://maps.googleapis.com/maps/api/js?key=AIzaSyCwJNsXGiPm4KJlQScJD-5oMDgNdsRST4k&amp;sensor=true"

    &amp; being the html entity for & -- you have to do this on ampersands as that's the character used for entities like &nbsp; &bull; etc, etc.

    Most of the rest of them is missing alt text -- though MOST of those images are presentation and as such have no business even being in IMG tags.

    You also have some nonsensical use of BR. you've got one that's <br /> XHTML style, again that should be a <br> if you're going to stick with HTML 4 (well, HTML 3.2 masquerading as HTML 4 thanks to it being a tranny)... you have another one that's </br> and that's just plain gibberish in every doctype.
     
    deathshadow, Mar 25, 2013 IP
  7. intellg

    intellg Well-Known Member

    Messages:
    397
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    130
    #7
    Hi deathshadow,
    Thanks for your support. I will follow it.
     
    intellg, Mar 25, 2013 IP