Re: Why no <IMG> inside <PRE>?

You, Daniel W. Connolly wrote:
++ 
++ In message <96Jan9.232901-0700_mst.138878-3+92@amisk.cs.ualberta.ca>, Gerald Os
++ koboiny writes:
++ >Much to my chagrin, it turns out that it's invalid to use <IMG> inside
++ ><PRE> in HTML 2.0. Is there some reason for this? (I guess I'm not asking
++ >if there's some reason it's like this in HTML 2.0, but rather is there
++ >some reason it "should" be this way in HTML?)
++ 
++ No -- no good reason, anyway. I think this was on the "to-do" list
++ during the HTML 2.0 review, and I just forgot to do it. I was surprised
++ myself when I went back and realized this change never got made.

Hmm, I always thought it was because the unit in <PRE> is characters,
and the unit of images is pixels. If I have:

<pre>
a b <img src = "foo.gif" alt = "xxx"> d
1 2 3 4
</pre>

to which should the 4 (vertically) align?

I fail to see how something can be "preformatted" (but using my font size)
and yet include images whose size bears no relation which the choosen font
size.

++ >Would it be possible to get this changed for the next version of HTML
++ 
++ Yes.
++ 
++ In fact, if anybody feels like cooking up DTDs as candidates for new
++ versions of HTML, please put them on the web and send a note including
++ the address to this list.

Well, the 28 March 1995 HTML 3.0 specifically excludes <IMG> from <PRE>:
<!ENTITY % pre.exclusion "TAB|MATH|IMG|BIG|SMALL|SUB|SUP">
<!ELEMENT PRE - - (%text)* -(%pre.exclusion)>

It always made sense to me... (that is, the exclusion of <IMG> in <PRE>).



Abigail

Received on Wednesday, 10 January 1996 03:35:46 UTC