标签约束(Element Prohibitions)
下列标签定义了一些约束条件指明其可以包含哪些标签作为子元素(参见SGML Exclusions)。此约束适用于所有的层次的嵌套,即适用所有的后代元素。
a标签:不能包含其他a标签
pre标签:不能包含img、object、big、small、sub和sup标签
button标签:不能包含input、select、textarea、label、button、form、fieldset、iframe和isindex标签
label标签:不能包含其他label标签
form标签:不能包含其他form标签
此文系翻译之W3C中Element Prohibitions片段,原文如下:
The following elements have prohibitions on which elements they can contain (see SGML Exclusions). This prohibition applies to all depths of nesting, i.e. it contains all the descendant elements.
a
must not contain otheraelements.
pre
must not contain theimg,object,big,small,sub, orsupelements.
button
must not contain theinput,select,textarea,label,button,form,fieldset,iframeorisindexelements.
label
must not contain otherlabelelements.
form
must not contain otherformelements.