Forum Moderators: open

Message Too Old, No Replies

Validate XHTML 1.1 target attribute substitute

Hopefully an easy one

         

Raphael

4:04 am on Aug 5, 2003 (gmt 0)

10+ Year Member



Hiya!

I wonder if anyone here can spot, at a glance, why this code would fail to validate:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<title></title>
</head>
<body>
<a href="blah.shtml" title="target blank this smeggin thing" onclick="self.target=blank">close</a>
</body>
</html>

It's a variation of something I found here [sitepoint.com]

Also, I found another webpage [modus2000.com] which says that the following will validate:


<a href="xjkwx" title="close this window" onclick="window.self.close()">close</a>

It doesn't - at least not for 1.1 (the page says it will for 1.0).

What the heck is going on here?

Also, can anyone recommend any good books for learning XHTML? Somethign in the WROX style (examples first, explanations second, rather than the traditional explanation first, followed by [only if you're lucky] examples).

tedster

5:56 am on Aug 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The W3C validator is not responding right now so I can't check on your code there. What error messages are you getting?