HTML cite Attribute


The cite attribute on an element specifies a citation or reference for its content, i.e. a piece of text. This text can be a quotation or it can be modified text. Elements that accept this attribute include <q>, <blockquote>, <del>, and <ins>.

Example

#

An cite attribute on a <q> tag.
The citation contains a URL to the source which is not visible.

To be, or not to be, that is the question -- by William Shakespeare.

<p>
  <q cite="https://en.wikipedia.org/wiki/To_be,_or_not_to_be">
     To be, or not to be, that is the question
  </q>
  -- by William Shakespeare.
</p>

For additional details see our HTML q cite Reference.


Using cite

The cite attribute specifies a URL to a reference or citation.

The URL is not visible, but is readable by screen readers, search engines, JavaScript code, and others.

The cite attribute accepts these URLs:

  • absolute URL - links to another website or domain (e.g. https://wikipedia.com)
  • relative URL - links to another page under the same domain

Syntax

<tagname cite="URL">

Values

#

Value Description
URL URL or path to a document that explains the quotation or text change.

Elements that accept cite

Elements that accept the cite attribute.

Elements Description
<q> Specifies a short quotation -- see example above
<blockquote> Creates a multi-line quotation.
<del> Specifies a deleted text.
<ins> Specifies an inserted text.

<blockquote> with cite

A <blockquote> tag with a cite attribute.

E-commerce (electronic commerce) is the activity of buying and selling products and services over the Internet.
<blockquote cite="https://en.wikipedia.org/wiki/E-commerce"
            style="padding: 10px; background: #f6f8ff; 
                   border-left: 2px solid steelblue;">
  E-commerce (electronic commerce) is the activity 
  of buying and selling products and services 
  over the Internet.
</blockquote>

For additional details see our HTML blockquote cite Reference.


<del> with cite

A <del> tag with a cite attribute.

Your order has been canceled cancelled.

<p>
  Your order has been 
  <del cite="https://www.dictionary.com/e/canceled-vs-cancelled/">
       canceled
  </del> 
  cancelled.
</p>

For additional details see our HTML del cite Reference.


<ins> with cite

An <ins> tag with a cite attribute.

HTTP stands for Hypertext Translate Transfer Protocol.

<p>
  HTTP stands for Hypertext <del>Translate</del> 
  <ins cite="/html/tags">Transfer</ins> Protocol.
</p>

For additional details see our HTML ins cite Reference.


Browser support

Here is when cite support started for each browser:

Chrome
1.0 Sep 2008
Firefox
1.0 Sep 2002
IE/Edge
1.0 Aug 1995
Opera
1.0 Jan 2006
Safari
1.0 Jan 2003

You may also like



Guides