Easy Tutorial
❮ Jsref Findindex Prop Reset Form ❯

cite Attribute

Quote Object

Example

Return the source of a citation:

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

The output of x is:


Definition and Usage

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

The cite attribute describes the URL source of the citation.

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


Browser Support

All major browsers support the cite attribute.


Syntax

Return the cite attribute:

Set the cite attribute:

Attribute Values

Value Description
URL The URL of the source of the citation. Possible values: Absolute URL - points to another website (e.g., cite="http://www.example.com")<br>Relative URL - points to a page within the website (e.g., cite="example.html")

Technical Description

| Return Value: | A string, the URL of the source document. | | --- | --- |


More Examples

Example

Modify the cite attribute value of a citation:

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

Related Pages

HTML Reference: HTML <q> cite Attribute


Quote Object

❮ Jsref Findindex Prop Reset Form ❯