SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Jun 2006
    Location
    London, UK
    Posts
    154
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    XHTML 1.1 Strict <form> issues

    Hi there peeps,

    At the below link I have multiple divisions with varying bit of a form in each one. When I validate the page I get an error saying that I have opened a form tag and not closed it, and then at the end of the document I have closed a form without having opened it.

    Any one know any specific problems with forms and divisions??

    The validation page is here: http://validator.w3.org/check?uri=ht...questform.html

    The actual page is here: http://www.dobys-cattery.co.uk/mains...questform.html
    Last edited by Morn; Jul 9, 2006 at 10:05. Reason: typo

  2. #2
    doing my best to help c2uk's Avatar
    Join Date
    May 2005
    Location
    Cardiff
    Posts
    1,832
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You might want to group your form with fieldsets instead of divs, and use a legend to provide a group heading: http://www.w3schools.com/html/html_forms.asp

    You might also want to look at the label - tag that is mentioned on the above page, I highly recommend both for accessibility and usability purposes.

    If you decide to stick with divs, this seems to be the reason for your error:

    HTML Code:
    <div id="ownersdetails">
    <form id="frmEnquiry" method="post" onsubmit="return checkall (this);" action="confirm.asp">
    should be like this:
    HTML Code:
    <form id="frmEnquiry" method="post" onsubmit="return checkall (this);" action="confirm.asp">
    <div id="ownersdetails">
    Dan G
    Marketing Strategist & Consultant

  3. #3
    SitePoint Zealot
    Join Date
    Jun 2006
    Location
    London, UK
    Posts
    154
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you very much for this information, I had not realised taht there was these elements within XHTML to format tables. This makes the table validated and so much eaiser to read.

    Thanks again

    Kindest Regards

    Graham

  4. #4
    doing my best to help c2uk's Avatar
    Join Date
    May 2005
    Location
    Cardiff
    Posts
    1,832
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Glad to be of help and well done!
    Dan G
    Marketing Strategist & Consultant


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
  •