Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > xhtml and input tag outside form

Reply
Thread Tools

xhtml and input tag outside form

 
 
Zone
Guest
Posts: n/a
 
      01-22-2008
Hello,

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.

I tried to read http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
but didn't find any solution.

Can anyone clearify were input is accepted if it's not inside form?

Cheers,


 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      01-23-2008
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.
>
> I tried to read http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
> but didn't find any solution.
>
> Can anyone clearify were input is accepted if it's not inside form?


HTML 4 and XHTML 1 allow form controls outside of 'form' elements as you
might want form controls in your HTML document for scripting or other
reason where you do not need to submit form data to the server. On the
other hand an old browser like Netscape 4 does not render form controls
outside of 'form' elements but Netscape 4 is not of relevance anymore.
As for where the DTD defines that form controls are allowed outside of
'form' elements, the relevant definitions are as follows
<!ENTITY % inline.forms "input | select | textarea | label | button">
<!ENTITY % inline "a | %special; | %fontstyle; | %phrase; |
%inline.forms;">
<!-- %Inline; covers inline or "text-level" elements -->
<!ENTITY % Inline "(#PCDATA | %inline; | %misc.inline*">
<!ELEMENT p %Inline;>
that defines the contents of p elements and allows form controls
(defined by inline.forms). There are similar definitions for other
elements allowing form controls too.


--

Martin Honnen
http://JavaScript.FAQTs.com/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error "A form tag with runat=server must exist" but there is a form tag!! André ASP .Net 2 06-23-2008 07:49 AM
xhtml and input tag outside form Zone HTML 10 01-24-2008 12:09 AM
help with pix inside->outside + dmz->outside + inside->outside->dmz Jack Cisco 0 09-19-2007 01:57 AM
how do u invoke Tag b's Tag Handler from within Tag a's tag Handler? shruds Java 1 01-27-2006 03:00 AM
what's the difference, URL in FORM tag and in INPUT tag john woo Javascript 1 06-29-2005 03:40 PM



Advertisments