Inline quotations: use q elements or not?

In an A List Apart article titled Long Live the Q Tag [sic], Stacey Cordoni suggests a solution that will enable Web authors to use the q element for marking up inline quotations and get quotation marks around the quoted text in Internet Explorer.

The recommendation is to mark up inline quotations with the q element (HTML tags vs. elements vs. attributes), manually add quotation marks outside the q element, and use CSS to hide the quotation marks compliant browsers automatically render at the beginning and end of q elements.

There is a lot of discussion back and forth on this subject, and, well, I have to admit that I’m not quite sure which is best here. Arguments for not using the q element at all as well as arguments for using it seem valid. My own use of the q element has also swayed a bit back and forth through the years, as well as what I have been recommending to others.

I do know that I would not use or recommend the method suggested in the article. Out of the available options, it actually seems like the worst choice.

If/when I were to use q elements instead of manually entering quotation marks, I would much prefer using the JavaScript technique described by Gez Lemon in Fixing Quotes in Internet Explorer. I would use conditional comments to make sure that only IE 7 and below run the script, just in case Microsoft get around to implementing full support for HTML in a future release. Yes, it relies on JavaScript, but at least it preserves the semantics of the markup and doesn’t punish users of modern browsers with CSS turned off.

Posted on October 3, 2006 in Accessibility, Web Standards