W3C home > Mailing lists > Public > www-validator@w3.org > September 2004

Re: [VE][79] Error Message Feedback

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
Message-ID: <Pine.GSO.4.58.0409151038200.23022@korppi.cs.tut.fi>

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

(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

Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
Received on Wednesday, 15 September 2004 07:45:47 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:42 UTC