views:

29

answers:

3

Can someone please tell me why this will not validate strict?

  <div>
    <form method="post" action="/search/keywords" />
    <input type="text" id="keyword" name="keyword" />
    <input type="image" src="/images/go.gif" alt="Search" />
  </div>

The problem is that I have two <form>s in my page and when I use the "/" to close the form tag, the browser executes the same action url for both even though they are different urls. When I close the form as the page will send to the proper url but it won't validate. I'm using XHTML 1.0 Strict doctype. Can someone please help?

A: 

I fixed it. :) Thanks for having a look guys.

Jack
Don't forget to mark it answered :)
Cesar
+2  A: 
<div>
    <form method="post" action="/search/keywords">
    <input type="text" id="keyword" name="keyword" />
    <input type="image" src="/images/go.gif" alt="Search" />
    </form>
</div>
<div>
    <form method="post" action="/search/keywords222">
    <input type="text" id="keyword" name="keyword" />
    <input type="image" src="/images/go.gif" alt="Search" />
    </form>
</div>
Cesar
This won't validate either as Strict, you cannot have `input` tags nested directly inside a `form` tag.
Darin Dimitrov
A: 

shame you did not paste the correct code :)

Noam Smadja