Member-only story
del tag in HTML
For more questions and answers visit our website at Frontend Interview Questions
What is the <del> Tag?
The <del> tag in HTML is used to indicate that text has been removed or deleted from a document. This tag is often used in conjunction with the <ins> tag, which represents text that has been inserted or added. Together, these tags are useful for showing changes or updates to content, especially in contexts like version control, editorial revisions, or document history.
Key Features of the <del> Tag:
- Semantic Meaning: Provides a clear indication that the enclosed text has been deleted.
- Visual Representation: Typically renders the deleted text with a strikethrough effect by default, although this can be styled differently using CSS.
Basic Syntax
The basic syntax for the <del> tag is:
<del>Text that has been deleted</del>Example:
<p>The new policy states that <del>employees must clock in at 9 AM</del> employees should start work at 8:30 AM.</p>In this example, the phrase “employees must clock in at 9 AM” is marked as deleted, indicating that this instruction is no longer valid.








