Hi chaps,
quick question. Is a html form tag always required when you add a form to the html? In other words if you have a form and leave out the form tag will the code still validate? I have heard some saying that a form tag is only necessary if the form passes data to the server or something like that. The reason for the question is that when I develop a web page for a CMS - sorry can't remember the name of this cms off the top of my head - it adds its own form tag straight after the body tag, whether there is a form or not, so that all the content after the body tag is effectively contained inside a form tag. The problem is that this cms accepts only 1 form tag, so if I happen to have a form in my html I can't use the tag anymore (if you try to use it the cms replaces it with a normal div, I don't know whether this is a bug that came with it or a feature)
thanks
Violet_82
89
Posting Whiz in Training
Recommended Answers
Jump to Postyes, the form tag is required. And it can not be nested.
Which is likely why the CMS you use replaces it with a div tag if you have forms inside your html that it wraps.
Which itself is nasty, as you might have multiple forms on a page, with …
All 3 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.