[Web4lib] re img question

Darryl Friesen Darryl.Friesen at usask.ca
Fri May 27 18:16:46 EDT 2005


> 1. If a page is HTML 4.01 then <img src="foo.png" height="125"> is
>    incorrect, yes?

No.  It's legal for both HTML 4.01 Transitional and Strict.  Well, not quite 
because it's missing the ALT atribute.  This is valid:

    <img src="foo.png" height="125" alt="Image">


> 3. As long as I'm at it, under what circumstances will
>    <img src="foo.png" height="125"> in a 4.01 page break?

None that I'm aware of.  The HEIGHT attribute has been around since HTML 
3.2, and it doesn't look like HTML 4.01 has done away with it (actually, it 
look like it's still OK all the way up to XHTML 1.1), so this should always 
work.  Someone correct me if I'm wrong.

Your use of the style attribute for image height will likely cause you some 
problems with older browsers though.


- Darryl

 ----------------------------------------------------------------------
  Darryl Friesen, B.Sc., Programmer/Analyst    Darryl.Friesen at usask.ca
  Education & Research Technology Services,     http://gollum.usask.ca/
  Information Technology Services Division,
  University of Saskatchewan
 ----------------------------------------------------------------------
  "Go not to the Elves for counsel, for they will say both no and yes"



More information about the Web4lib mailing list