Making ABBR work in IE

The abbr tag doesn’t work in Internet Explorer for Windows, but, using client-side scripting, you can make it work.

It occurred to me while reading Marek’s article, that a similar trick could be used to avoid messing up your pages mark up just render quotations properly in IE. The usual trick to make quotations work in IE is to do the following in the page markup:

<q>"[...some text...]"<q>

And then put the following rules in your style sheet to keep the browsers that work right from rendering two sets of quote marks:

q:after{content: no-close-quote }q:before{content: no-open-quote }

But this has the disavantage of messing up your otherwise semantically correct markup just to support IE.

So why not use Marek’s trick to keep the special entities out of the markup and only insert them when IE is sniffed? Granted, if the user has scripting turned off, the quotes disappear, but the markup is still correct.

This entry was posted in Webmastering. Bookmark the permalink.