How to use the HTML cite tag and the cite attribute?

by Yang Yang on August 27, 2009

Share This Article:
Subscribe to Kavoir: blog feed

There are at the same time a <cite> tag and a cite attribute in HTML. How does one correctly use them?

<q> is for inline quotations, such as when you need to quote a few words, half a sentence or a phrase from someone.

<blockquote> is for large chunks of text quotations, usually displayed as a block in CSS.

<cite>, doesn’t contain any quoted content but the quote author. For example,

<p>According to <cite>Einstein</cite>, <q>space can be bent</q>.</p>

Yep, that’s the correct use of the cite tag.

The cite attribute or property for <q> and <blockquote>, as in,

<blockquote cite="http://www.kavoir.com/">
<p><cite>, doesn’t contain any quoted content but the quote author.</p>
</blockquote>

Is for listing the source of the citation.

Share This Article:
Subscribe to Kavoir: blog feed

You should also read:

{ 2 comments… read them below or add one }

Taliesin March 31, 2010 at 6:39 am

Would you use the cite tag or the cite attribute for the author and page number of a printed source? For example:

According to Einstein space can be bent (p. 3 Theory of Relativity).

or

According to Einstein space can be bent.

or something different?

Reply

apocalyptiq November 2, 2011 at 11:32 pm

Actually, in HTML5 cite tag is for title of the work, NOT author name: http://dev.w3.org/html5/spec/text-level-semantics.html#the-cite-element

Reply

Leave a Comment

{ 1 trackback }

Previous post:

Next post: