nested blocks of data with headers

I've noticed that with HTML it is difficult to nest ordinary blocks of
data with headers well.  Take for instance a document which contains among
other types of blocks, chapters, sections, and subsections, each being a
subset of the former listed.  Ordinarily, I could use <h2> for the
chapters headings, <h3> for sections, and <h4> for the subsections.
For example:

However, this sort of layout assumes knowledge of what "heading level" the
one right above chapters is.  That is, I cannot blindly assign <h2> for
chapter headings, because perhaps there is another division in the
document, named "parts", which are supersets of chapters.

The problem, I feel, is due to the hard-coding of the heading numbers. You
run into a similar problem if you writing old BASIC and blindly number
your lines 1,2,3,4...n, and then realize you need a line between 2 and 3.

This sort of nesting problems with headers does not seem visible in
similar block structures, such as un/ordered lists, or definition lists.
These block structures can be blindly nested, without "environmental"
knowledge.  That is, I can always, given list_1, put another list_2 inside
of an element of list_1, growing the nesting "inward".  Similarly, given a
list_2, put it inside of a just-created list_1 element (growing the
nesting "outward").

I could solve the problem with headers using non-semanatic measures such
as <div>'s and classes.  But semantics are good.

Is this failure of not being able to nest well just a flaw in HTML, and/or
is there a good solution I can consider?

-- 
Frank Tobin		http://www.uiuc.edu/~ftobin/

Received on Saturday, 18 November 2000 00:49:22 UTC