<PRE><IMG SRC="funnychar.gif">This line contains a funny glyph</PRE>
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>
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 firstname.lastname@example.org
-- 73 de ke9tv/2, Kevin KENNY GE Corporate R&D, Niskayuna, New York, USA