# xHTML Strict, target=

**URL:** <https://forum.kirupa.com/t/xhtml-strict-target/183118>\
**Category:** web dev\
**Created:** [March 23, 2006, 11:01pm UTC](https://forum.kirupa.com/t/xhtml-strict-target/183118 "2006-03-23T23:01:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![simplistik](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/simplistik/32/7747_2.png) [@simplistik](https://forum.kirupa.com/u/simplistik)\
**Post date:** [March 23, 2006, 11:01pm UTC](https://forum.kirupa.com/t/xhtml-strict-target/183118/1 "2006-03-23T23:01:56Z")

</div>

So I noticed as I was completing one of my xHTML designs. When I went to verify it, everything verified except for the target in an anchor. So for example

```auto

<a href="www.google.com" target="_blank">www.google.com</a>

```

works great in Transitional, well Strict doesn’t allow target as a property.  
[http://www.w3schools.com/tags/tag\_a.asp](http://www.w3schools.com/tags/tag_a.asp)

Does anyone else have a solution that isn’t based around JS that will allow for that same kinda of functionality? Basically opening a link in a new window…?

---

<div class="post-metadata">

**Author:** ![Ankou](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ankou/32/1351_2.png) [@Ankou](https://forum.kirupa.com/u/Ankou)\
**Post date:** [March 24, 2006, 1:04am UTC](https://forum.kirupa.com/t/xhtml-strict-target/183118/2 "2006-03-24T01:04:04Z")

</div>

As far as I know there isn’t a solution that’s not based around Javascript (I really hope to be proved wrong on this because it would make life easier!). All the methods I’ve seen to make opening new windows in an XHTML Strict doc use some variation of Javascript.

And from what I’ve read most people encountering this problem do one of three things:

1. Change to XHTML Transitional.
2. Use the Javascript.
3. Skip the opening of a new window.

---

<div class="post-metadata">

**Author:** ![Jeff\_Wheeler](https://avatars.discourse-cdn.com/v4/letter/j/59ef9b/32.png) [@Jeff\_Wheeler](https://forum.kirupa.com/u/Jeff_Wheeler)\
**Post date:** [March 24, 2006, 1:21am UTC](https://forum.kirupa.com/t/xhtml-strict-target/183118/3 "2006-03-24T01:21:58Z")

</div>

Yeah, JS is the only way to do it, as far as I know.

Google brought up this (JS) method:

> **[New-Window Links in a Standards-Compliant World Article — SitePoint](https://www.sitepoint.com/standards-compliant-world/)**
>
> On the surface, the latest (X)HTML standards seem to frown upon links that open in a new window with target=\_blank. But with a little creativity, new-window links can be done in a standards-compliant way, with minimum hassle.

---

<div class="post-metadata">

**Author:** ![simplistik](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/simplistik/32/7747_2.png) [@simplistik](https://forum.kirupa.com/u/simplistik)\
**Post date:** [March 24, 2006, 1:49am UTC](https://forum.kirupa.com/t/xhtml-strict-target/183118/4 "2006-03-24T01:49:20Z")

</div>

right, i did a google search b4 asking and i saw that. my problem is that the client doesn’t want to use JS or Flash… which is fine. And she actually wanted it to be strict too, and she didn’t want the links to open into the same page when she viewed the template… so you see there enlies (sp) my problem. I guess I’ll just have to explain it’ll have to be transitional. Thanks fellas :D, wish there was a way though ☹

---

<div class="post-metadata">

**Author:** ![Jeff\_Wheeler](https://avatars.discourse-cdn.com/v4/letter/j/59ef9b/32.png) [@Jeff\_Wheeler](https://forum.kirupa.com/u/Jeff_Wheeler)\
**Post date:** [March 24, 2006, 1:59am UTC](https://forum.kirupa.com/t/xhtml-strict-target/183118/5 "2006-03-24T01:59:01Z")

</div>

Yeah… sorry.

---

<div class="post-metadata">

**Author:** ![Ankou](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ankou/32/1351_2.png) [@Ankou](https://forum.kirupa.com/u/Ankou)\
**Post date:** [March 24, 2006, 8:04am UTC](https://forum.kirupa.com/t/xhtml-strict-target/183118/6 "2006-03-24T08:04:42Z")

</div>

Yeah like nokrev said, sorry. You’ll just have to explain to your client that as of now there’s not a perfect solution to this issue (that you know of).

However when explaining that to the client make sure to let her know that there are a few JS options available and that really there aren’t that bad. I mean if you think about it the "rel=“external” solution isn’t too bad of a way to go. If worse come to worse and a visitor to the site has JS disabled, the page just opens into the normal window. Which would be the same if you were to go the non-JS, XHTML strict route anyway.

I still really hope that some can come along and provide a non-JS way of doing this. It would be SO helpful to anyone making XHTML strict sites.
