[thelist] Target="_blank" error

Edwin Martin edwin at bitstorm.org
Sun Jan 18 03:11:39 CST 2009


2009/1/16 Stacie Pearson <stacie at saracenodesign.com>:
> How come I am getting this error when I validate my markup?
>
> The tag: "a" doesn't have an attribute: "target" in currently active
> versions.[XHTML 1.0 strict]
>
> The error is referring to: target="_blank".
> I thought that is what I was supposed to use if I wanted the browser to open
> a new tab/window, and not be taken from my site.

What I haven't seen in this thread is that you don't have to use the
transitional DTD.

In XHTML, all HTML-elements that cope with windows, like frames and
the target-attribute, are split off in the Frameset-DTD.

So use this Doctype if you want a strict DTD and be able to use the
target-attribute:

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

Here's the spec:
http://www.w3.org/TR/xhtml1/#normative

Edwin Martin

-- 
http://www.bitstorm.org/edwin/en/



More information about the thelist mailing list