Is it correct to use DIV inside FORM?

前端 未结 10 1630
旧巷少年郎
旧巷少年郎 2020-12-02 17:51

I\'m just wondering what are you thinking about DIV-tag inside FORM-tag?

I need something like this:

&l
10条回答
  •  遥遥无期
    2020-12-02 18:40

    It is completely acceptable to use a DIV inside a tag.

    If you look at the default CSS 2.1 stylesheet, div and p are both in the display: block category. Then looking at the HTML 4.01 specification for the form element, they include not only

    tags, but

    tags, so of course
    would meet the same criteria. There is also a tag inside the form in the documentation.

    For instance, the following passes HTML4 validation in strict mode:

     
    
    
    
    Test
    
    
    
    
    Test:

    提交回复
    热议问题