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

Blockquote cite attribute

Blockquote cite attribute

Blockquote Object Reference Blockquote object

Example

Return a citation source:

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

x The output result is:

http://www.worldwildlife.org/who/index.html

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 attribute:

blockquoteObject

.cite

Set the cite attribute:

blockquoteObject

.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 of the original document.

    More examples

    Example

    Modify the cite attribute value of the quotation:

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

    Try it »


    Related pages

    HTML Reference Manual: HTML

    cite attribute

    Blockquote Object Reference Blockquote object