Request for clarification -- HyperText Markup Language Specification - 2.0

kennykb@dssv01.crd.ge.com
Tue, 1 Nov 94 13:33:16 EST

I am somewhat confused by things that seem to be anomalies in the
draft of the HTML 2.0 specification dated 17 October 1994.
==
In the `DTD Element References' in Section 7, there seem to be some
peculiarities with respect to <IMG ...>. For instance, it appears that
an image may not be included in preformatted text

<PRE><IMG SRC="funnychar.gif">This line contains a funny glyph</PRE>
* Forbidden

However, <EM> is allowed within <PRE>, and <IMG> is allowed within <EM>:

<PRE><EM><IMG SRC="funnychar.gif"></EM>This line contains a funny glyph</PRE>
* Allowed (?)

I have actually been known to use this type of construct, in a creative
abuse of HTML; I can provide sample documents if you like.
==
The element references seem to be full of similar anomalies. Another example
is that <INPUT> appears to be allowed only as direct content of a <FORM>.
Surely, this cannot be what was intended; most forms that I've examined
are structured like:

<FORM METHOD=GET ACTION="HTTP://MY.HOST.NAME/REST/OF/URL">
<P>Your name:<INPUT TYPE=TEXT SIZE=16 NAME=NAME></P>
<P>Your e-mail address:<INPUT TYPE=TEXT SIZE=32 NAME=EMAIL></P>
<P><INPUT TYPE=SUBMIT VALUE="Submit"><INPUT TYPE=RESET VALUE="Reset"></P>
</FORM>

and have <INPUT>'s interspersed freely with characters. Otherwise, there's
no attractive way to label the input fields, and so on. Do I really have
to have the inputs stand alone outside of paragraphs? That looks awful!
==
I have discovered these anomalies only because I've started playing with
HotMeTaL, which takes a legalistic approach to the DTD. The browsers all
seem to handle my documents acceptably. I'm worried, though, since
I'm trying to code to the `lowest common denominator', avoiding features
that are specific to any one browser. Now, however, I find that virtually
all of my HTML is out of compliance in one way or another, if the
rules of which entities are allowed in which other entities' content
are interpreted as strictly as possible.

How far afield have I strayed?

Thanks, Kevin KENNY kennykb@crd.ge.com

--
73 de ke9tv/2, Kevin KENNY	GE Corporate R&D, Niskayuna, New York, USA