<del>

Draft

Definition

The <del> HTML element is used to represent deleted or removed content within a document. It is typically used to indicate that a portion of text or other content has been deleted or marked as no longer valid.

Here’s an example of how to use the <del> element:

<p>Before: <del>This text has been removed.</del></p>

In this example, the <del> element is used to wrap the portion of text that has been deleted or removed. By default, the content within the <del> element is rendered with a strikethrough effect to indicate that it is no longer valid or relevant.

The <del> element can also include a cite attribute to specify a URL or source where more information about the deletion can be found. This can be useful in cases where the removal of content is accompanied by an explanation or reference.

It’s important to note that the <del> element is primarily intended for indicating deleted or removed content within a document. It is typically used in conjunction with the <ins> element, which represents inserted or added content.

When using the <del> element, it’s recommended to provide alternative content or explanations for users who may not be able to see the strikethrough styling or understand its significance. This can be done through CSS styles or additional text describing the deletion.