In this article, we will learn how to define some text that has been deleted from the document. This can be used to show a recent update in content or remove content that may be incorrect. It is usually followed by text that has been updated or corrected.
We will use the <del> element to specify text that has been deleted from the document. The browser will usually strike through the text present in this tag to distinguish it from the rest of the content. This element has two attributes that can be used to specify the citation and the time that the change was made.
Syntax:
<del>Deleted text</del>
The below example illustrates the <del> element to define the text that has been deleted from the document.
Example: In this example, we are using the above-explained approach.
HTML
<!DOCTYPE html>
< html lang = "en" >
< head >
< title >
How to define a text that has been deleted
from the document in HTML5 ?
</ title >
</ head >
< body >
< h1 style = "color: green;" >
GeeksforGeeks
</ h1 >
< b >
How to define a text that has
been inserted into a document
</ b >
< p >< del >This line has been deleted.</ del ></ p >
< p >The venue for the event is the
datetime = "2018-11-21T15:55:03Z" >
Auditorium
</ del > < ins >Open Air Theatre</ ins >.
</ p >
</ body >
</ html >
|
Output:

del element
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape,
GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out -
check it out now!
Last Updated :
06 Jun, 2023
Like Article
Save Article