Descendant Exclusions


 

The XHTML 1.1 DTD, which is based on XML 1.0, is not able to specify descendant exclusions to an arbitrary depth (only the permitted children can be specified, with no control over grandchildren, and so on). Some elements, however, must never be nested (at any depth) and so a list of such exclusions is presented here.

  • a elements must not contain, at any nesting depth, the element:
        a
  • button elements must not contain, at any nesting depth, any of the elements:
        input, select, textarea, label, button, form, fieldset
    Personally, based upon the content model for the *HTML 4.01 BUTTON element, I would expect the anchor element, a, to be included in this list (especially as it is not allowed as a direct child).
  • form elements must not contain, at any nesting depth, the element:
        form
  • label elements must not contain, at any nesting depth, the element:
        label
  • pre elements must not contain, at any nesting depth, any of the elements:
        img, object, big, small, sub, sup

If you disobey any of these rules, your document may nevertheless appear to validate, but it will not be following the W3C XHTML specification.
See: *XHTML 1.0 Element Prohibitions which states these exclusions for XHTML 1.0 - they still apply to XHTML 1.1 - (I have not included the iframe and isindex elements, which are not discussed on this site).

Also, from the W3C *Ruby Annotation Module - Formal Definition:

  • rb and rt elements must not contain, at any nesting depth, the element:
        ruby

Page Footer & Copyright

Copyright © Sally Maughan 2005-2009 (Page last updated on 16 May 2009)

*Valid XHTML 1.1 - hosted by *Openstrike

Content based on the W3C Working Draft: *XHTML 1.1 and Recommendation: *XHTML Modularisation 1.1.

W3C, XHTML, XML, HTML, CSS and MathML are *Trademarks of the W3C (*MIT, *ERCIM, *Keio) with which the site's author has no connection.


Up, Next & Previous Links

Your Location

Home > XHTML 1.1 Home > Nesting in XHTML 1.1 > Descendant Exclusions