Target denied

<![CDATA[I found something out today that really caught me by surprise. It makes sense in theory but in practice I think it's a bad idea. Not doing it would just be a slight niggle on purists.

The target attribute of a tags is no longer allowed in HTML (HTML 4.01 Strict and XHTML 1.0 Strict).

This is technically corect since HTML is for marking structure of a document and opening things in different windows is a user-interface issue and hence is within the domain of javascript.

What’s really odd though is the suggested workaround. Mark tags that need to open in a different frame or window somehow (rel="external" for instance) and then use a javascript function to give all those links a target attribute.

Seems silly to me.

HTML, XHTML, standards, Javascript, ECMAScript, DOM]]>

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s