HTML Errors - Bad Header?

Discussion in 'HTML & Website Design' started by hovesh07, Jan 9, 2009.

  1. #1
    Hi All,
    When using the 3WC HTML check I get a gazillion errors.
    The site is: http://www.lakersauctions.com/

    The test is:
    http://validator.w3.org/check?verbose=1&uri=http://lakersauctions.com/index.php
    Code (markup):
    I think it's because of the HTML header, specifically the lines:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" >
    
    Code (markup):
    Am I defining the lines incorrectly, or am I missing something?
     
    hovesh07, Jan 9, 2009 IP
  2. JB Stylized

    JB Stylized Guest

    Messages:
    15
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I took a look at the code for your page... and at the validator page.

    One thing I see... you don't put alt text on anchor tags.

    For xhtml strict you can't put a div in an anchor tag. Switching to transitional should fix that.

    You can't use target="_blank" in XHTML strict. In order to stay with strict you must use javascript to open a new tab or window.

    Those are just the first three errors from the validator. XHTML strict is very hard to comply with, but possible.

    The easiest fix is to switch from strict to transitional and then go from there. If that is not an option for you, then I will do what I can to help you with the code.
     
    JB Stylized, Jan 9, 2009 IP
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #3
    At 287 validation errors, my immediate reaction is there's nothing even worth TRYING to save as it would be faster to rewrite the whole thing from scratch than to try and fix it. Normally when I see lots of errors I say "You don't have HTML, you have gibberish" - this goes above and beyond that.

    I'm not even going to say much more because what's going through my mind about the code of said site would get me banned HERE... and you REALLY have to **** up to get banned on this site.

    Mein gott, the code for this is like a laundry list of everything I've ranted and raved about being WRONG with websites people have designed... I'm used to seeing two or three from my list of hundreds - NOT the whole list.
     
    deathshadow, Jan 9, 2009 IP
  4. hovesh07

    hovesh07 Well-Known Member

    Messages:
    389
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    108
    #4
    Thanks for the reply.
    1. I'll try to get rid the alt in the anchor text. That should be easy.
    2. For transitional, do I use this line:
    <!DOCTYPE html
      PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    
    Code (markup):
    3. Should I just avoid XHTML and go to standard HTML? I think the strict XHTML came from a template I once received.
     
    hovesh07, Jan 10, 2009 IP
  5. JB Stylized

    JB Stylized Guest

    Messages:
    15
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    2. yes.. that will work. That will help fix most of the errors. Once you do that then check the validator and see what's left to fix.

    3. I don't think that will be necessary. In fact it will require more work if you go to HTML rather than XHTML. I would suggest staying with XHTML or basically you will have to start over.

    Once you have it switched to transitional post back here and I'll take a look and I'll do what I can to help you from there. Don't give up :) Stick with it, and if need be we'll go line by line and fix what needs to be fixed. Just hang in there and don't get overly frustrated with it.
     
    JB Stylized, Jan 10, 2009 IP
  6. hovesh07

    hovesh07 Well-Known Member

    Messages:
    389
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    108
    #6
    Thanks everybody for all your help and suggestions.
    I switched to transitional, and clawed my way down to 0 errors.
    Should I now go back to "strict"?
    Does lowering my html errors have any effect on SEO?
     
    hovesh07, Jan 10, 2009 IP
  7. JB Stylized

    JB Stylized Guest

    Messages:
    15
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Well done :) I'd say leave it at transitional.

    The biggest benefit of zero errors is that browsers can process the information properly.
     
    JB Stylized, Jan 10, 2009 IP