<del> element is used to show a deleted portion of text and is commonly intended to show the changes made to a document while keeping a history of the changes made. Though the style can be changed using [CSS] (https://www.codecademy.com/resources/docs/css/typography/text-decoration), browsers render it as strike-through text:
<del>element is semantically different from the
<s>element because the former conveys an update in a document while the latter does not.
<del> <!-- deleted text here --> </del>
<del> element should only contain text content or other elements meant for text content.
The following is an example of the
<html><head> </head><body><p>This is <del>deleted</del> text.</p></body></html>
The rendered output would look like this:
Interested in helping build Docs? Read the Contribution Guide or share your thoughts in this feedback form.
Learn HTML on Codecademy
Front-End EngineerFront-end engineers work closely with designers to make websites beautiful, functional, and fast.
Includes 34 Courses
With Professional Certification