HTML | DOM del cite Property
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
- Safar
Recommended Posts:
- HTML | DOM ins cite Property
- HTML | DOM blockquote cite Property
- HTML | cite Tag
- HTML | DOM Cite Object
- HTML | <ins> cite Attribute
- HTML | cite attribute
- HTML | <q> cite Attribute
- HTML | <del> cite Attribute
- HTML | <blockquote> cite Attribute
- HTML | DOM li value Property
- HTML | DOM URL Property
- HTML | DOM dir Property
- HTML | DOM id Property
- HTML | DOM name Property
- HTML | DOM specified 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.



