A while back, I received the following e-mail from a colleague:
This is an intervention.
The <q> element should only be used for quotations. To ensure correct usage of the <q> element, always use the "cite" attribute when using a <q> element (or a <blockquote> element). If there is no "cite" attribute that makes sense, then <q> is the wrong element.
I think we need to have more interventions like that on the Web. If you look a page's source and wince at the <table> elements used for layout or the gratuitous use of <div> elements, send the author an e-mail. Don't just squirm, do something about it. And certainly, certainly write good code yourself.
Disclaimer: I don't admit to writing 100% semantic code, but I know I've improved over the years, certainly due to hints from friends and colleagues. I also know that my current site isn't very semantic and I hope to fix that at some undisclosed point in the future when I move away from a canned theme.
PS: Naturally, I put the above quotation in a <blockquote> element. I can't cite the source, since it's from a private e-mail. Is that so wrong?


Comments
Note: Comments with a light blue background were made by the site owner.
I don't see how it could be
I don't see how it could be wrong to markup a quotation as a quotation if it's clearly one, but you can't name a source for some reason? However that is different from not being able to come up with a cite attribute at all, you merely can't use the one you come up with.
I guess the problem was that
I guess the problem was that I was using <q> for stuff like "Don't eat me!," where there's nothing to cite since I'm just writing what someone said.
Hmmm
I can guess who that colleague is anyway ;)
Close. He's an
Close. ;) He's an ex-colleague now....
div elements
"...or the gratuitous use of <div> elements..."
There seems to be some false belief by web newbies that there's something magical about the CSS properties of div elements. It's just a generic block element, you could style any element exactly the same way. Adding more divs adds nothing to the page except wasted bytes. I always try to use as few of them as I possibly can.
You lazy boy. Enough
|q cite="what mother said"|You lazy boy|/q|.
Enough said.
M.