The DOM del cite Property in HTML DOM is used to set or return the value of the cite attribute of a <del> element. The cite attribute is used to specify the URL of the document or message which denotes the reason for deleting the text. It has no visual effect on any ordinary Web Browser. It can only be used by screen readers.
Syntax:
- It returns the cite property.
delObject.cite
- It is used to set the cite property.
delObject.cite = URL
Property Vaues:
- URL: It specifies the URL of the document that defines why the text was deleting other previous text.
Possible values are:- Absolute URL: It is used to point out other websites (like cite =”http://www.w3schools.com”)
- Relative URL: It is used to point out the page within the website. (like cite=”geeks.htm”)
Return Value: It returns a string value which represents the URL of the source document.
Example-1: This Example returns the cite Property.
<!DOCTYPE html><html><head><title>HTML DOM Del cite Property</title><style>del {color: red;}ins {color: green;}</style></head><bodystyle="text-align:center;"><h1>GeeksforGeeks</h1><h2>DOM Del cite Property</h2><p>GeeksforGeeks is a<delid="GFG"cite="www.GeeksForGeeks.com">mathematical</del><ins>computer</ins> science portal</p><buttononclick="myGeeks()">Submit</button><pid="sudo"style="Font-size:25px;color:green;"></p><script>function myGeeks() {var g =document.getElementById("GFG").cite;document.getElementById("sudo").innerHTML = g;}</script></body></html>chevron_rightfilter_noneOutput:
Before Clicking On Button:

After Clicking On Button:

Example-2: This Example sets the cite Property.
<!DOCTYPE html><html><head><title>HTML DOM Del cite Property</title><style>del {color: red;}ins {color: green;}</style></head><bodystyle="text-align:center;"><h1>GeeksforGeeks</h1><h2>DOM Del cite Property</h2><p>GeeksforGeeks is a<delid="GFG"cite="www.GeeksForGeeks.com">mathematical</del><ins>computer</ins> science portal</p><buttononclick="myGeeks()">Submit</button><pid="sudo"style="Font-size:25px;color:green;"></p><script>function myGeeks() {var g =document.getElementById("GFG").cite ="www.finecomb.com";document.getElementById("sudo").innerHTML ="The cite attribute was changd to " + g;}</script></body></html>chevron_rightfilter_noneOutput:
Before Clicking On Button:

After Clicking On Button:

Supported Browsers: The browser supported by DOM Del cite property are listed below:
- Google Chrome
- Internet Explorer 10.0 +
- Firefox
- Opera
- Safari
Recommended Posts:
- HTML | <del> cite Attribute
- HTML | DOM del dateTime Property
- HTML | DOM ins cite Property
- HTML | DOM blockquote cite Property
- HTML | DOM Quote cite Property
- HTML | DOM Del Object
- HTML | DOM Cite Object
- HTML | <del> Tag
- HTML | <del> datetime Attribute
- HTML | cite Tag
- HTML | <blockquote> cite Attribute
- HTML | <ins> cite Attribute
- HTML | <q> cite Attribute
- HTML | cite attribute
- Use of blockquote, q and cite tags in HTML
- HTML | DOM lang Property
- HTML | DOM Style backgroundClip Property
- HTML | DOM Style borderTop Property
- HTML | DOM Meter max Property
- HTML | DOM Input Hidden value Property
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : shubham_singh


