Re: IMG in PRE? -Reply

Gerald Oskoboiny (gerald@cs.ualberta.ca)
Mon, 13 May 1996 13:31:32 -0600 (MDT)


Subject: Re: IMG in PRE? -Reply
From: Gerald Oskoboiny <gerald@cs.ualberta.ca>
To: www-html@w3.org
Date: 	Mon, 13 May 1996 13:31:32 -0600 (MDT)
In-Reply-To: <s1971975.075@wposmtp.nps.navy.mil> from "Charles Peyton Taylor" at May 13, 96 11:13:35 am
Message-Id: <96May13.133344-0600_mdt.138914-4+35@amisk.cs.ualberta.ca>

Charles Peyton Taylor writes:

> >>> Keith Instone <instone@cs.bgsu.edu> 05/12/96 09:57am >>>
> >With HTML 3.2 being ironed out, is it time to allow IMG in PRE?
> >I read the discussion on www-html from back in January on this
> >topic and still do not see a good reason to exclude IMG from
> >within PRE.
> 
> I remember this conversation, and I remember Abigail 
> pointing out what was wrong with it.

I brought this up in January, and I believe I answered all concerns
raised at the time.

In short:

   - it's current practice (this is used all over the place to align stuff
     without using tables; for an example, see http://sunsite.unc.edu/ ),

   - it's extremely useful (http://ugweb.cs.ualberta.ca/~gerald/validate/),

   - it "works" with every browser that I know of.

This should be enough to make it standardized behavior.

Below is my reply to Abigail's concerns; a selective archive of the
thread is also available at:

   http://ugweb.cs.ualberta.ca/~gerald/validate/img-in-pre.html

Gerald

Subject: Re: Why no <IMG> inside <PRE>?
From:   Gerald Oskoboiny <gerald@cs.ualberta.ca>
To:     www-html@w3.org
Date:   Wed, 10 Jan 1996 10:06:13 -0700 (MST)
Message-Id: <96Jan10.100830-0700_mst.138884-3+20@amisk.cs.ualberta.ca>


Abigail writes:

> Daniel W. Connolly wrote:
> ++
> ++ Gerald Oskoboiny 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 guess that would be "undefined", but, if you have:

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

and "foo.gif" is exactly as wide as "bar.gif", the behavior is well-defined,
and extremely useful. (as in, for instance, <URL:http://sunsite.unc.edu/>.)

Gerald
p.s. anyone know why this is being echoed on www-talk?
--
Gerald Oskoboiny  <gerald@cs.ualberta.ca>  http://ugweb.cs.ualberta.ca/~gerald/