Welcome to the Personal Website of George Michael Huff

Jun 21 2006

I had to jump through numerous hoops to get this site to be of strict compliance. I figured I would share to get some dialogue going about different techniques that others have used as well as my own.

Although this list is published, I may add more to it in the future, just because this stuff never ends.

Before the list though, I would like to thank Steve James over at epicunion for keeping me up to date on the good, the bad, and the ugly of web standards. Everytime I think I can teach him something, he ends up teaching me.

Please comment on this post if you have any feelings towards any of it.

1. The “target” attribute I feel the target=”_blank” function isn’t as obsolete as the w3c would have us believe. In all practical respects, most websites do not want to direct traffic away from their sites. While it is nice I have a flickr picture gallery feed coming to my site, I do not want to send all of my traffic from my site to flickr. With tab browsing becoming the norm (with the release of IE7 of course) links opening new tabs is not the annoyance that it once may have been. With that being said, here is the first hoop:

Strict XHTML does not allow the “target” attribute within a tags. Now, by no means did I come up with this solution, I found it here. There are far brighter folks than me kickin it on the web and I can only express my gratitude for them to share their solutions. Moving on..

Instead of using target=”_blank” one must use rel=”external”. But the fun doesn’t stop there, one also needs to include a JavaScript file on every page that looks like this.

function externalLinks() {
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
for (var i=0; i<anchors.length; i++) {
var anchor = anchors[i];
if (anchor.getAttribute(”href”) &&
anchor.getAttribute(”rel”) == “external”)
anchor.target = “_blank”;
}
}
window.onload = externalLinks;

All in all, it’s a great solution to a problem, that I feel, shouldn’t exist. But that’s just me.

2. Feeds Compliance - I listed my feeds on every page with contact information. When I went to validate my code, I found the W3C really didn’t like my flickr feed. The workaround:

I opened a FeedBurner account and ran my feeds through them. Upon which, I also now have tracking for my RSS feeds. I am still not totally convinced of the accuracy of FeedBurner, but I really appreciate their effort to provide this as a limited service for free.

This particular problem brings up the lack of effort from many of the cool “web 2.0″ companies to bring their services up to standards. While I understand they are focused on their service, it would be nice to see a little more love shown to the standards community.

3. YouTube Embed - Yet to be solved. James over at The Good Harvest, is tackling the problem. More flash wizardry to come.

4 Building good clean XHTML and CSS - More important than anything I have mentioned is to practice good coding. Think about what you are doing before you do it. I am not claiming to have perfect code, but I am claiming that is what I stive for. If you care to take it there, I am more than open to suggestions on my own coding practices. Always learning…

Popularity: 9% [?]

Comments for Building it Strict - XHTML Compliance

    Gravatar

    James June 21st, 2006 at 10:59 pm

    Good post man. I plan on using that Flickr feed myself soon so that hack you found could come in handy. But my standards are only XHTML Transitional. I can’t wait to see what else you have up your sleeve.

You Say about Building it Strict - XHTML Compliance

Welcome to the Website of Eleven3. I like to build clean websites, period.

This Is George Huff

He is a web designer / entrepreneur / conspirator / blogger / fianceé living in Portland, Oregon.

When not fully immersed building websites, he runs a record label, writes music, throws a music festival, grows vegetables, and happens to be a huge advocate of his friends and family.

Currently My Latest Twitter

it's slowly turning into a work night. Gotta say it is going to be tough getting anything done on a Sunday for awhile. 5 hrs ago Follow Me

Work by Industry

Sport

  • Body by Dance
  • This is American Soccer
  • Clint Dempsey

Arts and Marketing

  • Tease Marketing
  • HomeSkillet Fest
  • Nicholas Galanin

Misc

  • Noyes Development
  • Ecoshuttle

Work by project type

Blogs

  • This is American Soccer
  • Nicholas Galanin
  • Clint Dempsey
  • Body by Dance

Websites

  • Tease Marketing
  • HomeSkillet Fest
  • Noyes Development
  • Ecoshuttle

Print

  • Sign of Life
  • HomeSkillet Fest '07 Catalog

Contact how can I help ya?

I am always open for work - sometimes more than others. Send me a message if you have a project that would be of interest. Cheers.

Send a copy to yourself