W3c Validation and Target _blank

Permalink
I am noticing that in a few locations throughout concrete5 core blocks that the use of target is included. Is there a reason for using this over the rel="external". Along with the use of transitional over strict.

I always remove these and add in the rel method for the sites we create as we try to keep the sites W3C valid(on the front end at least) we use XHTML and am wandering what Concrete5 long term aims are with regards to html/xhtml?

For anyone else wanting to look at implementing the rel='external' without the need for the target attribute.

you would need some javascript to achieve this.
// There is no target attribute in HTML 4.01 Strict.
// This script hunts for links that are either to a different website, PDF or have the attribute rel='external'
// and pops them open in a new window
$(function() {
  var h = window.location.host.toLowerCase(); 
  $("a[href^='http']:not(a[href^='http://" + h + "']):not(a[href^='http://www." + h + "']), a[href$='.pdf'],      a[rel='external']").click(function() {   
     window.open($(this).attr('href')); 
     return false;   
   });
});

TheRealSean
 
andrew replied on at Permalink Best Answer Reply
andrew
I believe "target" is available as a valid attribute in HTML5, and I think that's where we're going to head. If it bothers you, I'd use HTML4 transitional until you're ready to transition to HTML5.
TheRealSean replied on at Permalink Reply
TheRealSean
Thank you Andrew I was not aware that target was valid in HTML5 we use strict although I have had to adjust for concrete to transitional.

We are progressively moving our sites to html5 but so many of our clients use ie6/7 that much of our efforts often mean resorting to images/script to achieve the same results. It's nice to see your heading down that route.

Sent from my pretentious device