HTML 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

 Live Demo

<!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

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

Updated on: 30-Jul-2019

116 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements