Re: Container vs. Empty Element

CyberWeb (web@sowebo.CHARM.NET)
Mon, 5 Dec 1994 10:24:57 -0500 (EST)

Mary Morris wrote:
> Can someone please tell me how to know if a tag should be
> a container or an empty element? I have looked at every
> DTD that I could find and they don't seem to indicate what
> a tag is there. I know that there are things like <em> that
> are absolutly containers, and that there are things like
> <p> which are becoming containers (chrysilis I guess). But
> what I want to know is how to tell the ones that should
> never be a container. Like <hr>. I would think that it should
> never be a container.

Why not? I could imagine it turning into a frame around
the contained text.
> Secondarily, does anyone have an absolute list of what can
> be embeded in what?
> For example, should I use:
> <li><h2> Blah </h2> or
> <h2><li> Blah
> <li> Blah </h2>
If I have understood the "HTML DTD Reference (Level 2)" at
(!!) then neither is valid. This document explicitly shows what may
be contained, and what it is allowed in content of..

You can find a number of authoritative HTML 2.0 documents at
which in turn can be found at
where they present the famous and excellent HTML Validation Service.

In general I'd like to remind you that you can find such WWW developer
resources at and if not then please let
me know..

> Does </li> make a difference above? If I want to make a
> head2 list item and have the text after the end of the head2
> still indent like a list item, is that allowed?
> I am not looking for answers to specific formatting questions here.
> I am trying to give examples of behavior that I have seen, and
> get a general rule of thumb on how it know what it should
> do.

I don't think one can expect a general rule of thumb to exist.
I have made the mistake of extrapolating behaviour from one HTML
element to another, only to find I was plain wrong. I don't think
this meant I was (totally) stupid or that Dan botched it; rather
that these things are subtle beyond simple rules of thumb..

Best thing, I've found, is to use their validator; it's at

CyberWeb / Virtual Library: a wealth of information on World
SoftWare Wide
WWW Systems Engineering Web