htmlvalidationtargetw3cxhtml-1.0-strict

XHTML Strict 1.0 - target="_blank" not valid?


I just validated my actual XHTML Strict 1.0 doc with the w3c validator service.. and it says that,

<ul id="socialnetwork">
            <li><a href="http://www.twitter.com" target="_blank"></a></li>
            <li><a href="http://www.flickr.com" target="_blank"></a></li>
            <li><a href="http://www.xing.com" target="_blank"></a></li>
            <li><a href="http://www.rss.com" target="_blank"></a></li>
</ul>

the target="_blank" is not valid.. but I need the target blank so a new tab will open in the browser, so that the user does not leave the main page.

What can I do? Why is this not valid?


Solution

  • You might want to check out the W3 Frequently Asked Questions: http://www.w3.org/MarkUp/2004/xhtml-faq#target

    Why was the target attribute removed from XHTML 1.1?

    It wasn't. XHTML 1.0 comes in three versions: strict, transitional, and frameset. All three of these were deliberately kept as close as possible to HTML 4.01 as XML would allow. XHTML 1.1 is an updated version of XHTML 1.0 strict, and no version of HTML strict has ever included the target attribute. The other two versions, transitional and frameset, were not updated, because there was nothing to update. If you want to use the target attribute, use XHTML 1.0 transitional.