08-03-2010, 12:39 AM
This is probably common sense, but I blatantly don't know a lot of HTML rules. So if I place <select> elements out of <form> elements, will I be violating HTML standards? If it is, is there an alternative to using <select> elements?
08-03-2010, 01:38 AM
No, <select> doesn't have to be inside a form. Some sites (jsrdirect.com (http://jsrdirect.com), where I like to buy my shirts) use dropdown menus for links, which is one way they can be used outside of their most common form use.
08-03-2010, 03:52 PM
No, <select> doesn't have to be inside a form.
Is the answer “nothing”? Well, then it is certainly not correct to use it outside of a form, semantics wise.
08-03-2010, 07:31 PM
Okay, I'll correct myself. You're right, I think it is improper to use it outside a form. Sorry for that.
08-03-2010, 07:43 PM
As far as I know, the select tags are suppose to be placed between the form tags with the proper syntax. It may work without them, but it is not syntactically correct. Leaving out the form's action="" even if there is no action will get it flagged by validator. Maybe HTML 5 will address this better.