XHTML validation

Discussion in 'Web Design & Coding' started by Khayman, Apr 3, 2004.

  1. Khayman

    Khayman I'm sorry Hal... Political User Folding Team

    Messages:
    5,518
    Location:
    England
    I thought i'd give a wack of getting my site XHTML validated

    I went to the validator page and i resolved most of the errors, of which there where hundreds (this is for the main page only atm) .

    I need some help getting rid of the last few errors, i'm not sure how to resolve them and keep the page looking the same
     
  2. NetRyder

    NetRyder Tech Junkie Folding Team

    Messages:
    13,256
    Location:
    New York City
    Code:
    Line 11, column 6:  required attribute "type" not specified  (explain...).
      <style>
    
    Add the attribute type="text/css" to the style tag. That should fix this error.

    The rest of the errors are due to the mixing of content and style elements, which is a no-no in XHTML. Attributes like "bordercolor" or "background" should be placed in an external stylesheet. The HTML page then refers to the stylesheet using this code, which is placed under the head tag on your page:
    Code:
    <link rel="stylesheet" type="text/css" href="myStyle.css" title="Default" />
     
  3. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    While on the subject, is there a validator which I can run locally on my system? Like a downloadable app or something? Preferrably with explanations etc. I want to recode my website to be XHTML compatible and a downloadable ap would a tad quicker in validation I think.
     
  4. Khayman

    Khayman I'm sorry Hal... Political User Folding Team

    Messages:
    5,518
    Location:
    England
    http://www.w3.org/People/Raggett/tidy/
     
  5. Khayman

    Khayman I'm sorry Hal... Political User Folding Team

    Messages:
    5,518
    Location:
    England
    Got all the errors now, going though all the sub pages... boring :)
     
  6. Electronic Punk

    Electronic Punk Administrator Staff Member Political User Folding Team

    Messages:
    18,589
    Location:
    Copenhagen, Denmark
    hehe

    I remember when I did it here :O
     
  7. Geffy

    Geffy Moderator Folding Team

    Messages:
    7,805
    Location:
    United Kingdom
    I remember when I did it on the previous version of my site, I am now working on a new site which is all complient, google spiderable, and degrades well with no Image and or no css support, am quite chuffed really :D
     
  8. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    i code to the spec. Anything that i dont write according to the spec i fix, and i dont make the same mistake again.
     
  9. j79zlr

    j79zlr Glaanies script monkey Political User

    Messages:
    2,725
    Location:
    Chicago
    Its not hard, and once you start doing it, you wont allow yourself to publish a page that isnt compliant.
     
  10. NetRyder

    NetRyder Tech Junkie Folding Team

    Messages:
    13,256
    Location:
    New York City
    Agreed. [​IMG]
     
  11. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    Compliance = \o/

    :D
     
  12. Khayman

    Khayman I'm sorry Hal... Political User Folding Team

    Messages:
    5,518
    Location:
    England
    Woohoo! .. etc