What is del tag in HTML?

The del tag in HTML is used to strike a line through a text segment to indicate it has been deleted. It is used to indicate information that has been updated or is no longer accurate.

The illustration below shows how the del tag can be used in HTML:

How del tag can be used in HTML?

Syntax

The syntax of del tag is as follows:

<del> Strike off text </del>

We begin by opening the tags using the <> symbol. In between, we write del. We then close the tags using the </> symbol. Once again, we will place the name of our tag in-between <> and after the / symbol. Any text in between will be marked as deleted.

Example

The code snippet below shows how we can use the del tag in HTML:

  • HTML
Copyright ©2024 Educative, Inc. All rights reserved