Jump to content

No "target" support for html strict


Andy-H

Recommended Posts

Hi, I am making a band website for a friend and have used the html 4.01 strict DTD, I have used google embedded flash player to sample mp3's but want them to open in an external window, the page conforms to w3c standards currently, however, the target attribute isn't supported under the w3c strict definition, I have tried rel="external" but this isn't supported by any major browser vendors. I have made the navigation work without javascript for SEO and swapped in a javascript onClick window open function to the links on document ready (using jQuery).

 

 

What would you do in my situation? Allow the target href to open in the same window when js is disabled or switch to transitional? The links in question will have the crawler nofollow instruction in place anyway so it would be purely for the purpose of browsing with js disabled.

 

 

Thanks, Andy.

Link to comment
Share on other sites

In your situation I'd use Transitional. Strict is great and all, but the web is all about presentation, and Strict doesn't allow some things you might want to use. Like link targets.

However in your situation I wouldn't force new windows/tabs on the user. Most people now have 3+ button mice and are familiar with right-clicking stuff. Also most modern browsers have tabs. If the user wants a new window or tab, they'll probably open it like that themselves.

However there are exceptions, like when you don't want the user to accidentally leave the page. Help popups, for instance.

 

You can use JavaScript/favorite library to

a) add target=_blank

b) add an onclick event handler (don't forget to cancel the event)

to

a) links with rel=external

b) links whose hrefs begin with "http(s)://" (my preferred choice, which implies that you ensure all such links (even those that stay on your site) have the full URI).

Link to comment
Share on other sites

I understand that but with it being a music player I don't think it's a bad thing to open it in an external window and have it play in the background. I could embed it in the actual html page on the site but that would present me with other problems, such as if the user requires to navigate to another page, the music will have to stop playing.

 

 

What are the advantages to using strict over transitional?

Are there any advantages to strict if the page almost validates to strict but i use target and transitional?

Are there any implications on SEO practices with strict and transitional?

 

 

Thanks for the help.

Link to comment
Share on other sites

If it's one of those little player things (not a full page player) then yeah, a popup is better.

 

What are the advantages to using strict over transitional?

Good question. I don't know of any.

 

Are there any advantages to strict if the page almost validates to strict but i use target and transitional?

"Almost" isn't good enough. Either it validates or it doesn't.

 

Are there any implications on SEO practices with strict and transitional?

No.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.