SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Web Design Addict
    Join Date
    Mar 2004
    Posts
    2,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    warnings in my xhtml...I don't understand how to fix them

    http://validator.w3.org/check?uri=ht...Inline&No200=1

    They are all warnings dealing with form elements, but I don't know how to get rid of them to validate the xhtml.


    If for whatever reason the link above doesn't work, the page I'm validating is http://www.randomjabber.com/blog/art..._test_article/
    Deron Sizemore
    ----------
    My Sites: LogoGala | Golf Ledger (coming soon)
    Twitter: Deron Sizemore

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The problem is exactly what the validator says: you are referring to IDs that do not exist. For instance you have a label with for="name", but there is no element that has id="name". You need to add the id attribute to your form controls, e.g.
    HTML Code:
    <input type="text" id="name" name="name" value="" size="40" class="name"/>
    Birnam wood is come to Dunsinane

  3. #3
    SitePoint Wizard drhowarddrfine's Avatar
    Join Date
    Aug 2005
    Posts
    3,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Simple enough. The "for" attribute must have a matching 'id' and there is none.

  4. #4
    Web Design Addict
    Join Date
    Mar 2004
    Posts
    2,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank you, that fixed it. I did not realize that I needed an ID when specifying a "for".
    Deron Sizemore
    ----------
    My Sites: LogoGala | Golf Ledger (coming soon)
    Twitter: Deron Sizemore


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •