Is it possible to wrap html form elements in multiple form tags?

故事扮演 提交于 2019-12-01 06:36:47

Nested forms are not allowed, according to the specification:

Given this input in the w3 validator:

<!DOCTYPE html><html><head><title>tit</title></head><body>
<form action="x">
    <form action="x">
        <input type="submit" value="x"> <!-- Submitting.. Which form...?-->
    </form>
</form>    
</body></html>

The w3 validator says:

The question appears to be “Can an HTML document contain several forms?” The correct answer is “Yes, as long as they are not nested.” The forms will be completely distinct, each with a set of fields of its own.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!