<del> Tag in HTML

The <del> tag in HTML is used to indicate text that has been deleted or removed from a document. Browsers typically render the deleted text with a strikethrough to signify its removal. This tag is often used to show corrections or updates in content.

Key Points on <del> Tag:

Syntax of <del> Tag:

Syntax Example

<del datetime="YYYY-MM-DD">Deleted Text</del>

Example of <del> Tag in HTML:

This example demonstrates the use of the <del> tag to mark text as deleted, with an optional datetime attribute indicating the date of deletion.

Code Example


        <p>We regret to inform you that the item <del datetime="2024-11-12">Laptop Model X123</del> is no longer available.</p>
                

Output

We regret to inform you that the item Laptop Model X123 is no longer available.

The <del> tag is ideal for visually representing deletions in a document, providing context for changes or corrections. The optional datetime attribute enhances this context by specifying when the deletion occurred.