| 
	
 | 
 Posted by Toby A Inkster on 01/23/08 09:43 
Zone wrote: 
 
> I have tried to understand why input field is valid outside form tag. I 
> seems to work outside form if e.g. input tag is inserted inside div tag. 
 
<input> (and <textarea>, <button>) is an inline element, like <span> or  
<em>, so can be used in any context where inline content is allowed, which  
is virtually everywhere. 
 
Why? Because otherwise <input> couldn't be contained in, for example, a  
paragraph, even if that paragraph was itself within a form, 
 
--  
Toby A Inkster BSc (Hons) ARCS 
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux] 
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 23 days, 20:54.] 
 
                            CSS to HTML Compiler 
           http://tobyinkster.co.uk/blog/2008/01/22/css-compile/
 
[Back to original message] 
 |