Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Quote cite Property

Quote cite Property

Reference Object ReferenceQuote Object

Example

Return a citation source:

var x = document.getElementById("myQuote").cite;

x The output result is:

http://www.wwf.org

Try it »


Definition and Usage

The cite attribute is used to set or return the value of the cite attribute of a quote.

The cite attribute describes the URL source address of the quotation.

Note: The cite attribute has no visual effect in ordinary web browsers, but can be used by screen readers.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

All major browsers support the cite attribute.


Syntax

Return the cite property:

quoteObject

.cite

Set the cite property:

quoteObject

.cite=

URL

Attribute values

Value Description
URL The URL of the citation source.

Possible values:

  • Absolute URL - points to another website (e.g. cite="http://www.example.com")
  • Relative URL - points to a page within the website (e.g. cite="example.html")
  • |

    Technical description

    Return value: A string, the URL address of the source document.

    More examples

    Example

    Modify the cite attribute value of the quotation:

    document.getElementById("myQuote").cite="http://www.cnn.com/";

    Try it »

    Related pages

    HTML Reference Manual: HTML cite attribute


    Reference Object ReferenceQuote Object