Welcome to WebmasterWorld Guest from 54.144.112.127

Forum Moderators: incrediBILL

Message Too Old, No Replies

Forms in 4.01 strict

error messages re tag <input>

     
2:09 pm on Apr 2, 2010 (gmt 0)

Junior Member

10+ Year Member

joined:Feb 24, 2006
posts: 111
votes: 0


I rarely use forms. Now I need a response form and I am getting an error message that "In HTML 4.01 Strict the tag <form> cannot contain a tag <input>. What is the alternative?
3:05 pm on Apr 2, 2010 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member fotiman is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Oct 17, 2005
posts:4986
votes: 12


The <form> element [w3.org] cannot directly contain <input> as a child. Form can only include block or script elements. So typically the best way to create your form is to include an inner <div> element. For example:

<form action="#">
<div>
<input ...>
...
</div>
</form>
8:46 pm on Apr 3, 2010 (gmt 0)

Junior Member

10+ Year Member

joined:Feb 24, 2006
posts:111
votes: 0


Fotiman thanks for the quick reply.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members