Html 字段集内的字段集
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/857363/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Fieldset inside fieldset
提问by zby
I think it is not allowed to have embedded fieldsets (fieldset inside another fieldset) - but I would like to confirm that.
我认为不允许嵌入字段集(另一个字段集内的字段集) - 但我想确认一下。
回答by Quentin
<!ELEMENT FIELDSET - - (#PCDATA,LEGEND,(%flow;)*) -- form control group -->
Fieldset must contain a legend followed by zero or more %flow elements
<!ENTITY % flow "%block; | %inline;">
Flow includes %block
流包括 %block
<!ENTITY % block
"P | %heading; | %list; | %preformatted; | DL | DIV | NOSCRIPT |
BLOCKQUOTE | FORM | HR | TABLE | FIELDSET | ADDRESS">
Block includes FIELDSET
块包括 FIELDSET
It is fine.
没事。
回答by RichieHindle
Yes, you can. The W3C validator at http://validator.w3.org/is happy with this:
是的你可以。http://validator.w3.org/ 上的 W3C 验证器对此很满意:
<html><head><title>test</title></head>
<body><form action='go'>
<fieldset><legend>1</legend>
<fieldset><legend>2</legend>
<input type='text'>
</fieldset>
</fieldset>
</form>
</body></html>
回答by Carpy
Yep you can do that. more info http://reference.sitepoint.com/html/fieldset
是的,你可以这样做。更多信息http://reference.sitepoint.com/html/fieldset
回答by Oli
No, it's legal.
不,这是合法的。
回答by Nate Pet
This is legal and in fact I have used it a number of times
这是合法的,事实上我已经多次使用它