HTML | DOM blockquote cite Property
The blockquote cite Property in HTML DOM is used to set or return the value of the cite attribute of a quotation. It is used to specify the URL of the Quotation. It does not contains visual effect on any ordinary Web Browser. It can only be used by screen readers.
Syntax:
- It returns the blockquote cite property.
blockquoteObject.cite
- It is used to set the blockquote cite property.
blockquoteObject.cite = URL
Property Values: It contains single value URL which specifies the URL of the quotation. The URL contains two possible values which are listed below:
- Absolute URL: It is used to refer to the other website. For example cite = “https://www.w3wiki.net”
- Relative URL: It is used to refer to the web page within the website. For example cite = “Beginner.htm
- Google Chrome
- Internet Explorer
- Firefox
- Opera
- Safari
Example 1: This example returns the blockquote cite property.
<!DOCTYPE html> < html > < head > < title > HTML DOM blockquote cite Property </ title > </ head > < body style = "text-align:center;" > < h1 style = "color:green;" >w3wiki</ h1 > < h2 >DOM blockquote cite Property</ h2 > < blockquote ID = "GFG" cite = "www.w3wiki.net" > w3wiki: A computer science portal for Beginner </ blockquote > < button onclick = "myBeginner()" >Submit</ button > < p id = "sudo" style = "color:green;font-size:24px;" ></ p > <!-- Script to return blockquote cite Property --> < script > function myBeginner() { var w = document.getElementById("GFG").cite; document.getElementById("sudo").innerHTML = w; } </ script > </ body > </ html > |
Output:
Before Clicking the Button:
After Clicking the Button:
Example 2: This example sets the blockquote cite property.
<!DOCTYPE html> < html > < head > < title > HTML DOM blockquote cite Property </ title > </ head > < body style = "text-align:center;" > < h1 style = "color:green;" >w3wiki</ h1 > < h2 >DOM blockquote cite Property</ h2 > < blockquote ID = "GFG" cite = "www.w3wiki.net" > w3wiki: A computer science portal for Beginner </ blockquote > < button onclick = "myBeginner()" >Submit</ button > < p id = "sudo" style = "color:green;font-size:24px;" ></ p > <!-- Script to set DOM blockquote cite Property --> < script > function myBeginner() { var w = document.getElementById("GFG").cite = "www.gfg.org"; document.getElementById("sudo").innerHTML = "The cite attribte was changed to " + w; } </ script > </ body > </ html > |
Output:
Before Clicking the Button:
After Clicking the Button:
Supported Browsers: The browser supported by DOM blockquote cite property are listed below: