Computer >> Computer tutorials >  >> Programming >> HTML

HTML <del> cite Attribute


The cite attribute of the <del> element sets a URL to the HTML document and states why a specific text was deleted.

 Following is the syntax −

<del cite="url">

Here, url is the link that displays the address of the document wherein it is specified why the text was deleted. 

Let us now see an example to implement the cite attribute of the <del> element −

Example

<!DOCTYPE html>
<html>
<body>
<h2>Subjects to Learn</h2>
<dl>
   <dt>JavaScript</dt>
   <dd>A scripting language.</dd>
   <dt>Java</dt>
   <dd>It is a programming language.</dd>
   <dt>jQuery</dt>
   <dd>A JavaScript library.</dd>
   <dt>C#</dt>
   <dd>Object-oriented programming language.</dd>
</dl>
<lp><del cite="exams_cancelled.htm">Internal Exams from 3rd May</del></p>
</body>
</html>

Output

HTML <del> cite Attribute

In the above example, we have deleted a text using the <del> element −

<del cite="exams_cancelled.htm">
   Internal Exams from 3rd May
</del>

Above, we have set the reason of deletion using the cite attribute −

cite="exams_cancelled.htm