fieldset必须是一种形式吗? [英] Does fieldset have to be in a form?

查看:138
本文介绍了fieldset必须是一种形式吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对DTD一无所知。

http://www.bls.gov/oco/ocos292.htm



看看fieldset在这个页面上如何在表单之外使用,它很酷!我喜欢这种风格!

解决方案

我认为这个问题中的问题和选择的答案是误导性的。无论表单是否必须具有字段集,以及是否存在字段集必须位于形式是两个不同的问题,有两个不同的答案。 在HTML4.01规范中,fieldset是表单中的有效元素,但由于它是一个标准的块级元素,所以也可以在其他地方使用:
http://www.w3.org/TR/html401/interact/forms.html#h-17.10
http://www.w3.org/TR/ html401 / sgml / dtd.html#block



但是,我不能想象一个用例,在这种情况下,除非您使用fieldset用于装饰,这将是不正确的用法。



然而,一个表单不需要字段集:
http://www.w3.org/TR /html401/interact/forms.html#h-17.3


I dont know anything about DTD.

http://www.bls.gov/oco/ocos292.htm

See how fieldset is used outside of form on this page and it's cool! I love the style!

解决方案

I think the question and chosen answer in this question are misleading. Whether or not a form has to have a fieldset, and whether or not a fieldset has to be in a form are two different questions with two different answers.

According to the HTML4.01 spec, a fieldset is a valid element inside of a form, but as it is a standard block-level element, it is also acceptable elsewhere: http://www.w3.org/TR/html401/interact/forms.html#h-17.10 http://www.w3.org/TR/html401/sgml/dtd.html#block

I can not, however, imagine a use case where this would be done, unless you are using the fieldset for decorating, which would be incorrect usage.

A form however, does not require a fieldset: http://www.w3.org/TR/html401/interact/forms.html#h-17.3

这篇关于fieldset必须是一种形式吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆