SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2006
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    XHTML 1Validation Failure

    I can't get one page from a website to validate as XHTML 1.0 Strict, it's at: http://www.houndsbaybassets.co.uk/contacts.shtml

    The error is: Error Line 360 column 9: end tag for element "form" which is not open. </form>

    Any help would be appreciated.

    Many thanks

  2. #2
    SitePoint Addict drjones013's Avatar
    Join Date
    Jan 2007
    Location
    Las Vegas, NV
    Posts
    216
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just did a list find in PSPad and didn't see where you opened the <form> element; there's a </form> element, however.

    HTML Code:
    	    <p>*Denotes required fields </p>
    	    <p class="submit">
    
    	      <label for="submit"></label>
    	      <input type="submit" name="submit" value="Send Message" id="submit" />
    	      <br />
            </p>
    <!-- the tag is here-->
    	  </form>
        </div>
    	
    </div>
    What is this </form> supposed to do?

  3. #3
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    1) Form controls of types submit, button, reset, and image should not have and associated <label>s.

    2) That error is because this
    Code:
    	  <form action="inc/FormMailASP.asp" method="post" class="contactform" id="form1" onsubmit=     "MM_validateForm('fullname','','R','email','','RisEmail','message','','R');return document.MM_returnValue" />
    becomes this if you remove all of the attributes:
    Code:
    <form  />
    it should be this
    Code:
    <form>
    3) It's best to avoid using inline event handlers. I suggest you read up on Unobtrusive JavaScript and other JavaScript Best Practices.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  4. #4
    SitePoint Addict drjones013's Avatar
    Join Date
    Jan 2007
    Location
    Las Vegas, NV
    Posts
    216
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Good catch;

    I honestly didn't know that was possible-- my bad


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
  •