The TARGET attribute is deprecated. There is a theoretical possibility that a browser only supports the HTML 4.01 Strict specification and therefore does not support TARGET. That same browser might support some other Javascript functionality, like window.open to actually open links or other things in new windows. However, I don't want to recommend that. The much weirder part is of course that you are using Javascript to insert attributes, because your document wouldn't validate as HTML 4.01 Strict otherwise. Plain wrong.
Opening a link a new window is evil. Read Day 16: Not opening new windows to understand why. Reading the first two points in the The Top Ten New Mistakes of Web Design (from 1999) might also give you an idea.
My argument made earlier about the TARGET being deprecated doesn't make much sense of course. Eventually, we will use it again for the OBJECT element in XHTML documents when some patch is applied.
Tutorial: Open site in new window, target="blank"
Moderator: effi
4 posts
• Page 1 of 1
Re: Tutorial: Open site in new window, target="blank"
Admittedly I am behind the curve on this (or I missed a memo). However, it seems to me that the new solution is really a crooked (and not so short) path just to get a link to open in a new window. While I use Wordpress/Thesis about 99% of the time, what is the solution for straight HTML sites? Are you implying that if I have an HTML site (or I don’t wish to create shortcodes, the only other solution is Jquery or some other Javascript code?
- droven4567
- Posts: 1
- Joined: Tue Nov 09, 2010 5:52 am
Re: Tutorial: Open site in new window, target="blank"
One thing to note is that now: "The target attribute for the a and area elements is no longer deprecated, as it is useful in Web applications, e.g. in conjunction with iframe."
From "HTML5 differences from HTML4 W3C Working Draft 25 May 2011" http://www.w3.org/TR/html5-diff/#new-attributes
Obviously it was altered after your message.
From "HTML5 differences from HTML4 W3C Working Draft 25 May 2011" http://www.w3.org/TR/html5-diff/#new-attributes
Obviously it was altered after your message.
- centaur
- Posts: 1
- Joined: Sun Jun 26, 2011 4:51 pm
4 posts
• Page 1 of 1
Return to Templates, plugins and tutorials
-
- Related topics
- Replies
- Views
- Last post
-
- RSS Feed links open in blank ?
by saidbakr » Fri Jun 12, 2009 7:25 pm - 1 Replies
- 2102 Views
- Last post by saidbakr
Sun Jun 14, 2009 5:11 pm
- RSS Feed links open in blank ?
-
- Need a good HTML tutorial
by jacksoncarrey » Mon Sep 06, 2010 3:08 pm - 1 Replies
- 3238 Views
- Last post by avinmichal
Wed Jul 13, 2011 3:16 pm
- Need a good HTML tutorial
-
- [TUTORIAL] Search autocomplete
by ping » Mon May 04, 2009 1:10 am - 5 Replies
- 5196 Views
- Last post by ping
Tue May 05, 2009 3:06 pm
- [TUTORIAL] Search autocomplete
-
- Tutorial to fix the sitemap.xml (thanks tobzbz)
by effi » Sun Jul 05, 2009 3:19 pm - 0 Replies
- 2794 Views
- Last post by effi
Sun Jul 05, 2009 3:19 pm
- Tutorial to fix the sitemap.xml (thanks tobzbz)
-
- Tutorial: Create a new custom Text
by saidbakr » Sun Jun 21, 2009 12:31 pm - 2 Replies
- 5310 Views
- Last post by saidbakr
Sun Mar 07, 2010 9:42 pm
- Tutorial: Create a new custom Text
Who is online
Users browsing this forum: No registered users and 2 guests