Allowed nesting of elements in HTML 4 Strict (and XHTML 1.0 Strict)



The information here is based on the DTDs, basically the Strict DTD, in the 1999-12-24 version of the HTML 4.01 Specification.

Note that XHTML 1.0 is, as its subtitle says, "A Reformulation of HTML 4 in XML 1.0", so the nesting rules are the same as in HTML 4.01. However, there are the following differences that affect the nesting rules:

Moreover, some of the restrictions on nesting are expressed differently; due to metalanguage differences, some limitations are described in prose only in the XHTML specification, and this implies that a validator will not catch such violations of the limitations when validating against XHTML DOCTYPE but will catch them when an HTML DOCTYPE is used. See section Differences with HTML 4 in the XHTML 1.0 Specification.

Date of last update: 2001-04-06

Interested in related documents? See a list of documents about WWW written or recommended by me.

Specifically, this document has a sister: Allowed nesting of elements in HTML 4 (and XHTML 1.0), which describes the rules for the Transitional and Frameset versions.

Jukka Korpela.