How to validate .PHP for html errors

Discussion in 'PHP' started by im.imrankhan, Oct 19, 2008.

  1. #1
    Hi friends

    :confused: I need help I have a site which have some html error but all pages are in .php format. I am unable to validate this w3c validation. I am unble to find any other tool to check php html error. Please tell me any online tool to check html error for my site.:confused: My site is customermath.com
     
    im.imrankhan, Oct 19, 2008 IP
  2. classic

    classic Peon

    Messages:
    96
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    classic, Oct 20, 2008 IP
  3. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #3
    After validating, fix the errors first in your HTML version and then alter the PHP version.
     
    EricBruggema, Oct 20, 2008 IP
  4. Bind

    Bind Peon

    Messages:
    70
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    most html validation errors are !doctype-related, meaning your are either using the wrong !doctype, OR you are using tags that !doctype doesnt allow.

    When validating via w3c, it tells you whats wrong. Simply scroll down the page and READ.

    1. add the appropriate !doctype if you dont have one,

    2. change to a less restrictive !doctype if you do have one,

    or 3. use css for formatting instead of disallowed tags / change the page structure as neeeded when you read the errors the validator spits out.

    you can also post the link to your webpage and we can try to help you if you dont understand much of this.
     
    Bind, Oct 20, 2008 IP