The cite element

I argued with a friend this morning about the citeelement in HTML. I thought <cite> could only be placed at the end of a blockquote element to indicate the source of the quote. And she thought it was for define citations in a paragraph while I thought that the q element was for them. But we were both wrong.

As it’s said in the W3C HTML 4.01 Specification, CITE contains a citation or a reference to other sources.. Well, the example is more explicit:

As <cite>Harry S. Truman</cite> said,
<q lang="en-us">The buck stops here.</q>

The cite element is mostly used to define who said something.

That’s quite confusing, isn’t it? <cite>, <q> and <blockquote cite=""> are really different, but are used for the same thing: quotes.

There are 10 comments yet. Don't be shy.

1. On September 29th, 2005 at 9:35 am, mireille said :mireille's gravatar

but.. why would you want to put in italics the person who said something?

2. On September 29th, 2005 at 11:30 am, Remi said :Remi's gravatar

Mireille, that’s something you don’t seem to understand ;-) The cite element is used to give “meaning” to data, you can easily remove the italic style.

3. On September 29th, 2005 at 11:53 am, mireille said :mireille's gravatar

I do understand! But the ‘default’ style still is italic. And often you don’t have control over how your element looks, as soon as you’re not the one writing the stylesheet.

But, anyway, I guess it doesn’t matter that much, since it’s only for my not-very-CSSy livejournal ;) Thanks for researching!

4. On October 1st, 2005 at 10:26 am, septor said :septor's gravatar

The bold tag is by far superior to the cite tag.

5. On October 1st, 2005 at 1:35 pm, Remi said :Remi's gravatar

Patrick, do you think you are able to post comment that would make sense?

6. On October 1st, 2005 at 7:42 pm, Joe said :Joe's gravatar

Not possible.

7. On October 2nd, 2005 at 3:18 am, Joël said :Joël's gravatar

Hum… It does make sense for me.

8. On October 2nd, 2005 at 1:36 pm, Remi said :Remi's gravatar

Joêl, explain please. :)

9. On October 2nd, 2005 at 2:09 pm, Joël said :Joël's gravatar

Take your dictionary.

10. On October 2nd, 2005 at 9:05 pm, septor said :septor's gravatar

Makes sense to me.


Sidebar