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,
<p><cite>, doesn't contain any quoted content but the quote author.</p>
Is for listing the source of the citation.
4 thoughts on “How to use the HTML cite tag and the cite attribute?”
Pingback: HTML Tags Design for Template / Theme Creation
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(p. 3 Theory of Relativity).
According to Einstein
or something different?
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
Quite right, apocalyptiq.
I love the part where the W3C article on the correct usage of the cite tag states: “A person’s name is not the title of a work â€” even if people call that person a piece of work …” 🙂
Comments are closed.