- From: Jukka K. Korpela <jkorpela@cs.tut.fi>
- Date: Wed, 15 Sep 2004 10:45:14 +0300 (EEST)
- To: Andrew Gray <sweetandy@comcast.net>
- Cc: www-validator@w3.org
On Tue, 14 Sep 2004, Andrew Gray wrote: > <img src="images/break.bmp" width=100% height=15></img> > > The final closing tag for /img is underlined and red. That's because you are using HTML 4.01, where an element with content model EMPTY (i.e., with no content allowed) like <img> need not and must not have an end tag. In XHTML the situation would be different, but even in XHTML, people normally use <img .../> and not <img ...></img>, see Appendix C. (If you don't know what "Appendix C" means, don't even imagine using XHTML on the Web before you have learned that.) Regarding the confusion around empty elements, see http://www.cs.tut.fi/~jkorpela/html/empty.html (Your <img> element also lacks the required alt attribute. Note that alt="" would be valid - and quite adequate for purely decorative image for which an empty string is a suitable replacement in non-visual presentation.) -- Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
Received on Wednesday, 15 September 2004 07:45:47 UTC