<cite> HTML Tag
- What does
<cite> HTML Tagdo?
- The <cite> element identifies the source of a quotation or creative work. Use the element to identify the name rather than the author or creator of a referenced creative work.
<blockquote> Any inaccuracies in this index may be explained by the fact that it has been sorted with the help of a computer.<br> — from <cite>The Art of Computer Programming</cite> by Donald Knuth </blockquote>
Any inaccuracies in this index may be explained by the fact that it has been sorted with the help of a computer.
— from The Art of Computer Programming by Donald Knuth
When to use
The purpose of the
<cite> element is to identify the source of a quote. The element should contain the title of a work from which the quote comes. The
<cite> tag is an underused element. It provides little or no presentational value, and is only there to add semantic information to
<q> elements. Most WYSIWYG editors (like the WordPress visual editor, for example) don’t even provide an easy way to add the
<cite> element to text. However, if you are interested in contributing the semantic web, it is worthwhile to take the time to add it when appropriate.
A bit of controversy
There are two different opinions about what should be included in the
<cite> element. The more restrictive opinion is that only the title of a work should be included. The less restrictive opinion is that the title of a work and also the author can be included.
<!-- More Restrictive --> <blockquote> I am the master of my fate, I am the captain of my sail. - from <cite>Invictus</cite>, by William Ernest Henley </blockquote> <!-- Less Restrictive --> <blockquote> I am the master of my fate, I am the captain of my sail. - from <cite>Invictus, by William Ernest Henley</cite> </blockquote>
Which standard to follow depends on you. If you care a lot about HTML validation and following standards, you probably want to follow the more restrictive practice. If you are interested in pushing web standards forward, you might want to adopt the more liberal practice. Either way, it is important to realize that just an author’s name is never a valid use of the
<cite> element. It should always contain at least the title of a work and, optionally, additional information such as the author.
<!-- DO NOT DO THIS --> <blockquote> I am the master of my fate, I am the captain of my sail. - <cite>William Ernest Henley</cite> </blockquote>
Browser Support for <cite> HTML Tag