Why is an input tag not allowed directly within a form tag?

后端 未结 4 1140
我寻月下人不归
我寻月下人不归 2020-12-17 21:50

I just read the following at http://w3fools.com/#html_forms:

Non-block-level elements (such as ) are not valid directly insi

4条回答
  •  甜味超标
    2020-12-17 22:20

    The above statement is true. In HTML the tag is not a valid element of the

    tag. In order to make this validate, you need to enclose the tag with either a
    or
    . Which is demonstrated below.

    
        
    Field:

提交回复
热议问题