BASE and IMG and [X]HTML

We've been having a discussion on the zope mailing list regarding the
validator's behavior with <base ... />. In particular, an HTML 4.01
transitional document is not allowed to use <base ... />. Instead, it is
expected to use <base ...>.

Well, okay. I don't like it but I accept the reasoning. But why does it not
complain about <img ... />? Isn't this the same situation?

You can validate kefta's homepage (www.kefta.conm) to see what I mean
although the little example below is probably clearer since our homepage has
other problems.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<base href="http://www.kefta.com">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>test</title></head>
<body>
hello.
<img src="http://blahblah" alt="xx" />
<img src="http://blahblah" alt="yy">
</body></html>

This will validate just fine. Change the base tag to end with ' />' and it
won't. In either case, the validator doesn't complain about either of the
img tags. What is the reasoning for accpting XHTML tag styles for img but
not for base?

Received on Monday, 23 September 2002 16:41:55 UTC